+ -
当前位置:首页 → 问答吧 → 如何删除2个表等于相同字段的数据

如何删除2个表等于相同字段的数据

时间:2010-10-09

来源:互联网

表 content
   id int(11)  
  lanmu_id smallint(6)                  
  title tinytext                
  text text  

表 lanmu
   lanmu_id smallint(6)            
  lanmu_type int(11)                  
  typename text

我想删除 表 lanmu 和表 content 中  lanmu_id=1的所有数据

mysql语句
DELETE FROM content AND lanmu WHERE lanmu_id = '1'

是不是错了 老是 显示 错误

作者: cixi2010   发布时间: 2010-10-09

DELETE FROM content,
lanmu WHERE lanmu_id = '1'

MySQL 返回:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE lanmu_id = '1'' at line 2

作者: cixi2010   发布时间: 2010-10-09

热门下载

更多