查询选择没有特定数据的所有数据 [英] Query select all data without specific data
本文介绍了查询选择没有特定数据的所有数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
有没有办法查询语句来选择所有数据但没有特定数据添加到下面的语句示例中?
示例: - SELECT * from databasename.tblUser;
我有tblUser。数据库包含所有用户标识。但我希望语句从表中选择所有数据而不使用当前用户登录ID。是否可能?
解决方案
将条件放在where子句中:
SELECT * from databasename.tblUser WHERE userid<> '当前用户登录ID的值'
尝试这个.... :)
SELECT * 来自 tblUser WHERE userid ( @ UserID < /跨度>)
Hi all,
Is there any way to query statement to select all data but without specific data to add into the statement example below?
Example:- SELECT * from databasename.tblUser;
I have tblUser. The database hold all the user ID. But I want the statement to select all data from table without the current user login ID. Is it possible?
解决方案
Put the condition in the where clause:
SELECT * from databasename.tblUser WHERE userid <> 'value of current user login id'
TRY THIS....:)
SELECT * from tblUser WHERE userid not in (@UserID)
这篇关于查询选择没有特定数据的所有数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文