Oracle中常用的函数
---sql的函数的使用(Oracle)
---dual的使用:哑元表:没有表需要查询的时候 可以用它
---select 'Hello World' from dual; ---结果:Hello World
---单行函数:单行
1.日期函数:系统时间:sysdate---select sysdate from dual; ---当前的系统时间---结果:2010-05-14
sysdate+(-)整数的含义---select sysdate+1 from dual; ---当前系统日期的后一天---结果:2010-05-15
---select sysdate-7 from dual; ---当前系统日期的上一周---结果:2010-05-07
日期间间隔的天数:日期1+(-)日期2---select (sysdate-hiredate) as 天数 from emp;
日期间间隔的月份:months_between(day1,day2):返回day1日期和day2日期之间相差的月份
---select months_between(sysdate,hiredate) as 月份 from emp;
to_char(day,'格式'):将一个数字或日期转换为字符串
---select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual; ---结果:2010-05-14 18:49:07
---格式变化:---select to_char(sysdate,'d') from dual;---今天是这一周的第几天---结
相关文档:
经验:
alter system set log_archive_dest=’D:\oracle\archivelog’ scope=spfile;
alter system set log_archive_start=true scope=spfile;
之后,
create pfile from spfile
可验证加上没
一、查看数据库运行模式
可以用超级用户(INTERNAL)在SQLPLUS中使用命令ARCHIVE LOG LIST查看
......
SELECT sde.st_area(zone) from sde.test1 ORDER BY name;//
SELECT shape from schools ORDER BY name;
SELECT objectid, sde.st_astext(SDE.ST_POINTfromSHAPE(shape,0)) AS points from schools;
SELECT name, sde.st_x (zone) "The X coordinate" from test ; //正确执行
SELECT name, sde.st_x (shape) "The ......
新建文件系统
crfs -v jfs -g rootvg -m /arch -a \ size=32768 -a frag=512 -a nbpi=8192 也可以 smit。
开启归档模式
$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Dec 10 13:38 ......
select dbtimezone from dual ; --查看数据库时区
select sessiontimezone from dual ; --查看会话时区
1.select u.name || '.' || o.name || '.' || c.name TSLTZcolumn
from sys.obj$ o, sys.col$ c, sys.user$ u
&nbs ......