
再输入if '@cnt' ='' then update policyexpress set printSEQ = '212121212' where policyno = '000000600326'
end if
select namefrom tb where name='li'
union all
select top 1 '没有这名字'
from tb where not exists(select 1 from tb where name='li')
两种格式,一种是时间戳,一种是日期格式①
SELECT IF(days = 1,"是","不是") as "是否星期天" FROM (SELECT DAYOFWEEK(FROM_UNIXTIME(time,"%Y-%m-%d")) AS days FROM table) tmp
---time是时间戳 , days = 1代表星期天
--把time 和 table 替换成你数据库的 字段和表
②
SELECT IF(days = 1,"是","不是") as "是否星期天" FROM (SELECT DAYOFWEEK(date) AS days FROM table) tmp
---date是日期格式 2017-11-21 , days = 1代表星期天
--把date 和 table 替换成你数据库的 字段和表
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)