SQL DELETE查询语法 [英] SQL DELETE query syntax
本文介绍了SQL DELETE查询语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要从两个表中删除两个数据,表1的主键是表2中的外键,请给我完整的删除查询语法.表1包含1条记录,表2包含多个记录,具体取决于那,请在这方面指导我
I want two delete data from two tabels, tabel 1''s primary key is foreign key in table 2, please give me the complete syntax of the delete query.table 1 contains 1 record and table 2 contains multiple record according to that, please guide me in this regard
推荐答案
如果您使用Cascade定义约束,那么您可以控制主表以及持有外键的表上的删除到-请参见此处 [
If you define your constraints with Cascade, then you can control delete on main as well as the table you hold a foreign key to - see here[^].
这篇关于SQL DELETE查询语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文