
如何判断数据库中select取到的值是空
1个回答
展开全部
在sql中
空值有NULL 和''的形式
当是NULL的时候用 IS NULL判断
当是''的时候用 =''判断
比如
select * from table where enddate IS NULL;
select * from table where str='';
空值有NULL 和''的形式
当是NULL的时候用 IS NULL判断
当是''的时候用 =''判断
比如
select * from table where enddate IS NULL;
select * from table where str='';
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询