查询mysql表中某个字段的值是否为一个空字符串语句怎样写? 我是这样写的,可编译出错

String sql="select* from News where Npicture!=null";rs=state.executeQuery(sql);急,在线等。

第1个回答  2013-05-05
判断为NULL 是 is null
"select* from News where Npicture is not null;
第2个回答  2013-05-05
可以使用count语句统计返回的结果条数~追问

可是我不想要结果数只是想要那一列中Npicture不是null字符串。

追答

String sql="select* from News where Npicture!=";rs=state.executeQuery(sql); 这样试试

追问

弄出来了,多谢!

本回答被提问者采纳
第3个回答  2013-05-07
韩国枯竭可能会
相似回答