在SQL Server中,如何在单个查询中删除多个表记录 [英] In SQL server,How to delete multiple table records in a single query
本文介绍了在SQL Server中,如何在单个查询中删除多个表记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我正在使用Vb.net和SQL Server
我尝试过
Hi all
Im using Vb.net and SQL server
I have tried like
delete FROM t_tdressordered as a , t_torderform as b
WHERE a.orderform_gid = '10'
and a.orderform_gid = b.orderform_gid
但是会出现错误lik:
消息156,第15级,状态1,第1行
关键字"as"附近的语法不正确.
在此先感谢
Regads
Naveen ....
But getting error lik :
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword ''as''.
Thanks in advance
Regads
Naveen....
推荐答案
尝试以下操作:
try this:
delete
from
t_tdressordered a
inner join t_torderform b on a.orderform_gid = b.orderform_gid
where
a.orderform_gid = '10'
这篇关于在SQL Server中,如何在单个查询中删除多个表记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文