delete dbo.GL_CHEQBOOKMST, dbo.GL_CHEQBOOKDTL
from dbo.GL_CHEQBOOKMST sam
inner join dbo.GL_CHEQBOOKDTL sad on sam.CBM_COCODE = sad.CBD_COCODE
where sam.CBM_COCODE='13'
此查询显示表格之间,
逗号的错误
帮助我谢谢
答案 0 :(得分:0)
你需要使用两个语句 - 一个单独的SQL语句不能从两个表中删除!
DELETE FROM dbo.GL_CHEQBOOKMST WHERE CBM_COCODE = 13
DELETE FROM dbo.GL_CHEQBOOKDTL WHERE CBM_COCODE = 13