易截截图软件、单文件、免安装、纯绿色、仅160KB

Oracle日期函数:

 select sysdate from dual; 从伪表查系统时间,以默认格式输出。
sysdate+(5/24/60/60) 在系统时间基础上延迟5秒
sysdate+5/24/60 在系统时间基础上延迟5分钟
sysdate+5/24 在系统时间基础上延迟5小时
sysdate+5 在系统时间基础上延迟5天
所以日期计算默认单位是天
round (sysdate,’day’) 不是四除五入了,是过了中午留下,不过的略掉
格式转换函数:
to_char显示日期:
从数字转化为char to_char(date,'格式')
从日期转化为char to_char(date, 'fmt' )
select to_char(sysdate, 'yyyy mm dd hh24:mi:ss') from dual;
select to_char(sysdate, 'fmyyyy mm dd hh24:mi:ss') from dual;
查出三月分入职的员工:
select first_name,start_date from s_emp where to_char(start_date,'mm')='03';
to_date表达日期:
字符转日期
select to_date('2000 11 20', 'yyyy mm dd ') from dual;
select round(to_date('10-OCT-06' ,'dd-mon-RR') ) from dual;
to_number
字符转数字
select to_number('10') from dual ;
函数、表达式、隐式数据类型转换会导致索引用不上,where条件后面只能放单行函数,它起了一个过滤的的作用。


相关文档:

Oracle 批量导入Sequence

 select 'create sequence '||sequence_name||  
       ' minvalue '||min_value||  
       ' maxvalue '||max_value||  
       ' start with '||last_number||  
&n ......

oracle审计详解

原帖: http://blog.chinaunix.net/u2/66903/showart_2082884.html
Oracle使用大量不同的审计方法来监控使用何种权限,以及访问哪些对象。审计不会防止使用这些权限,但可以提供有用的信息,用于揭示权限的滥用和误用。
下表中总结了Oracle数据库中不同类型的审计。
审 计 类 型
说    明
语句审计 ......

Oracle trim 函数的用法

 select trim(leading | trailing | both '  ' from '   abc      d      ') from dual;
 去掉字符串 '   abc      d      ' 的前面/后面/前后的空格
 类似函数:ltrim, ......

Oracle 数字函数用法

 1. round(Num,n) :  四舍五入数字Num,保留n位小数,不写N默认不要小数,四舍五入到整数个位
 select ROUND(21.237,2) from dual; 
 结果: 21.24
 2. trunc(Num,n) : 截取数字Num,保留n位小数,不写N默认是0,即不要小数
 select TRUNC(21.237,2) from dual;
 结果:21.2 ......

小布老师oracle视频讲座笔记(二)

Oracle Process Structure
Oracle takes advantage of various types of processes:
 —User process: Started at the time a database user requests connection to the Oracle server
  —Server process: Connects to the Oracle instance and is started when a user establishes a session
& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号