mysql中判断字段为空
发布时间:2020-05-23 15:30:49 所属栏目:MySql 来源:互联网
导读:mysql中判断字段为null或者不为null在mysql中,查询某字段为空时,切记不可用 = null,而是 is null,不为空则是 is not nullselect nulcolumn from table;if nuncolumn is null thenselect 1;elseselect 2;end if;执行存储过程调用过程:call sp_add (1,2,@a
|
中判断字段为null或者不为null 在mysql中,查询某字段为空时,切记不可用 = null, 而是 is null,不为空则是 is not null select nulcolumn from table; if nuncolumn is null then select 1; else select 2; end if; 执行存储过程
|
