同时删除吗? SQL code: delete b where content is null go delete t where not exists(select 1 from b where tid=t.id) go
SQL code: delete b where content is null delete t from t inner join b on t.id=b.tid where b.content is null
是的..要两个表中的那些数据同时删除! 同时删除要触发器把! 我试试3楼和4楼的方法! SQL code: delete t from t inner join b on t.id=b.tid where b.content is null delete b where content is null
试一下 SQL code:
delete t ,b from b left join t on b.id = t.id where b.content is null