如何屏避数据库中某些数据?

来源:百度知道 编辑:UC知道 时间:2024/06/03 16:57:36
比如库中有一条数据是"金钱",在显示的时候我要把这个数据屏蔽,让他不在网页中显示,应该怎么做呢

select * from table where (select money from table)<>'金钱'
select distinct top 21 author from product where len(author)<4 and (select distinct(author) from product)<>'本报'这条语句报错,Microsoft JET Database Engine (0x80004005)
子查询最多能返回一个记录。

select a,b,c from (select * from table where money<>'金钱')
select top 21 author from (select distinct(author) from product where len(author)<4 and author<>'本报')

SELECT [字段名表] FROM [表名] WHERE [条件]
用多少取多少,显示的写出字段名表,其中不包括money字段。
比如:select userid, username, usersex, usertel, useraddress from table

把*号替换成其它字段句
或者在显示时不要直接显示所有字段 而是逐在显示在对应表格中就可以