注册 登录
编程论坛 SQL Server论坛

[求助]关于delete 语句的用法

冬日暖阳 发布于 2007-07-04 09:01, 990 次点击
delete from student
where s_name='曾碧霞'
where s_name='曾小霞'
where s_name='曾文彬'



是不是不可以这样并列写语句呀?


服务器: 消息 156,级别 15,状态 1,行 3
在关键字 'where' 附近有语法错误。
2 回复
#2
sky_yang_sky2007-07-04 10:31

是的,你要是要它同時滿這些條件,就將後兩WHERE改為and,如果是不需要同滿足的話就改為OR

#3
bygg2007-07-04 10:33
delete from student
where s_name in ('曾碧霞','曾小霞','曾文彬')
1