oracle 查询字段值首字母为字母的值
select * from 表名 WHERE regexp_like (字段名, ‘1+\d+$’, ‘i’)
–四舍五入
select round(1.2345, 3) from dual
–保留三位小数
select trunc(1.2345, 3) from dual
–向上取整
select ceil(1.2345) from dual
–向下取整
select floor(1.2345) from dual
–取小数点三位的数
select * from outp_bill_items where floor(costs*100)/100<>costs
–删字段
Alter Table OUTPADM.CLINIC_INDEX_SSZZJ
Drop Column time_desc
—授权
grant select on outpdoct.outp_order_serial_no to system;
–返回当前日期
select trunc(sysdate)from dual;
–返回当前小时
select trunc(sysdate,‘hh’)from dual;
–返回当前时间的分钟,没有秒的精确,只有毫秒。
select trunc(sysdate,‘mi’)from dual;
–返回当前星期的第一天(为星期天,工作的第一天为星期一)
select trunc(sysdate,‘d’)from dual;
a-zA-Z ↩︎