sql 语句令某一行不显示。 例如: 这个行的某一个值为0,不显示这一行

2025-05-10 03:39:47
推荐回答(4个)
回答1:

xxx为数值
select * from t where t.xxx != 0

xxx为字符

select * from t where t.xxx != '0'

回答2:

select * from table where id <> 0(id =0的遮一行不显示哈)

回答3:

你问的事 一行中,某一不指定列的值为0,还是指定列的值为0。

select * from table where ltrim(rtrim(列)) not in ('0')

回答4:

select * from table where 列<>'0'