oracle 常用 sql

两字段拼接:concat(t.indate,  t.intime) as 就诊时间

抽样

SELECT   MRID,
case PaperType  when '0'  then '0-身份证' when '1' then '1-军人证' when '2' then '2-其它' else null  end as 证件类型,
 PaperNum as 证件号码,
 McNum as 医保号
FROM   MainMr SAMPLE (0.07)

猜你喜欢

转载自www.cnblogs.com/quietwalk/p/9055204.html