求一最基础的触发器语句!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
有两个表 books和newbook
当删除books中的某行时 ,如果在newbook中也有这本书 同时也要删除 (两个表中都有个bookid的列 存放书的id)
我想用触发器实现 应该怎么写?
------解决方案--------------------你上面delete 删除,删的是什么表呢,所以错,可以
delete newbook from deleted where newbook.bookid=deleted.bookid