xxx为数值
select * from t where t.xxx != 0
xxx为字符
select * from t where t.xxx != '0'
select * from table where id <> 0(id =0的遮一行不显示哈)
你问的事 一行中,某一不指定列的值为0,还是指定列的值为0。
select * from table where ltrim(rtrim(列)) not in ('0')
select * from table where 列<>'0'