摘要:
数学函数1.绝对值S:select abs(-1) valueO:select abs(-1) value from dual2.取整(大)S:select ceiling(-1.001) valueO:select ceil(-1.001) value from dual3.取整(小)S:select floor(-1.001) valueO:select floor(-1.001) value from dual4.取整(截取)S:select cast(-1.002 as int) valueO:select trunc(-1.002) value from dual5.四舍五入S:se 阅读全文
摘要:
表名“TH_PRIVILEGE”查询语句:with tt(l,ID,NAME,PID) as(select l=case when PID IS null then 1 when PID IS not null then 2 end,ID,NAME,PID from TH_PRIVILEGE union allselect l=case when t1.PID IS null then 1 when t1.PID IS not null then 2 end,t1.ID,t1.NAME,t1.PID from TH_PRIVILEGE t1inner join tt b on t1.ID=.. 阅读全文