用于select的sql查询 [英] sql query for select
本文介绍了用于select的sql查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
CREATE PROCEDURE dbo.StaffPayment_ddl_Groupname
AS
select * from Groups where GroupId IS NOT ''7''
RETURN
这会给我错误:''7'附近的语法不正确
什么是问题..
this will give me error : Incorrect Syntax near ''7''
what is problem..
推荐答案
HI,
将您的代码更改为以下内容:
Change your code to like the following:
CREATE PROCEDURE dbo.StaffPayment_ddl_Groupname
AS
BEGIN
select * from Groups where GroupId <> '7'
END
谢谢
Thanks
你好
使用Not In查询。
赞
select * from Groups其中GroupId NOT IN(''7'')
Hello
Use the Not In for query.
Like
select * from Groups where GroupId NOT IN (''7'')
也可以这样尝试
Hi ,
Try like this also
CREATE PROCEDURE dbo.StaffPayment_ddl_Groupname
AS
BEGIN
SELECT * FROM Groups WHERE GroupId NOT IN ('7')
END
:-) :-) :-)
问候,
GVPrabu
:-) :-) :-)
Regards,
GVPrabu
这篇关于用于select的sql查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文