1
我想一次刪除多個記錄。批量刪除數據庫表中的記錄
我有兩個表,一個包含
comments: comment_id, comment, author_id
news_comments: news_id, comment_id
我想從news_comments刪除所有記錄,其中AUTHOR_ID在意見表= 1。
我試着這樣做,但它給了我關於子查詢返回的多個項目的錯誤:
delete from news_items where comment_id =
(select comment_id from comments where author_id = 1)