这个别sql语句怎么写-- sql 语句 中 or 的用法
表User_Table中有100条不同用户的记录(即有100个用户,表中主键是用户名UserId),但我只想看10个用户的信息.那10用户名单已有.
我的sql 语句是:
select * from User_Table where XXX and XXX and XXX and UserId=U1 or
UserId=U2 or ....order by UserId
我并不是想看前10个用户,这样写只是为了表示方便.
这种写法行不通,提示如下:
Microsoft VBScript 运行时错误 错误 '800a0006' 溢出
or的用法是怎样的?
如果这样写:
select * from User_Table where XXX and XXX and XXX and UserId<>U11 and
UserId<>U12 and ..... order by UserId
是可以,但很累啊.我要写90个啊
请问大家有没有好方法.