我想一次删除多条记录。
我有两张桌子,一张包含
comments: comment_id, comment, author_id
news_comments: news_id, comment_id
我想从评论表中 author_id = 1 的 news_comments 中删除所有记录。
我试过这样做,但它给了我一个关于返回多个项目的子查询的错误:
delete from news_items where comment_id =
(select comment_id from comments where author_id = 1)