"景先生毕设|www.jxszl.com

sql if写法

2023-09-12 15:40编辑: www.jxszl.com景先生毕设

          sql if写法

语法:
if (condition)
begin
(statement block)
end
else if (condition)
begin
statement block)
end
else
begin
(statement block)
end
或者:用case语句可以达到同样的效果
select
case  when  字段1='条件1' else  值1
      when  字段1='条件2' else  值2....
      else '' end
         
 from daul

原文链接:http://www.jxszl.com/biancheng/shujuku/445487.html