您的位置:首页 > 数据库 > MySQL

mysq 存储过程判断为空null , mysql存储过程 字符串拼接

2014-04-02 15:48 495 查看
mysq 存储过程判断为空null , mysql存储过程 字符串拼接,mysq 存储过程判断为空null , mysql存储过程 字符串拼接,mysq 存储过程判断为空null , mysql存储过程 字符串拼接.

 

mysq 存储过程判断为空null 方法:

 

if i_os_type='' then
      set os_type_sql=CONCAT('=','');
   elseif i_os_type is null then
      set os_type_sql=' is null';
   else
      set os_type_sql=CONCAT('=',i_os_type);
   end if;

 

mysql存储过程 字符串拼接方法:

 

DECLARE  os_type_sql VARCHAR(100);

 if i_os_type='' then
      set os_type_sql=CONCAT('=','');
   elseif i_os_type is null then
      set os_type_sql=' is null';
   else
      set os_type_sql=CONCAT('=',i_os_type);
   end if;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: