117. 两个结果集互减的函数?
sql>select * from bsempms_old minus select * from bsempms_new;
118. 如何配置sequence? 建sequence seq_custid
create sequence seq_custid start 1 incrememt by 1; 建表时:
create table cust
{ cust_id smallint not null, ...}
insert 时:
insert into table cust
values( seq_cust.nextval, ...)
日期的各部分的常用的的写法 119>.取时间点的年份的写法:
select to_char(sys2003-10-17,'yyyy') from dual;
120>.取时间点的月份的写法:
select to_char(sys2003-10-17,'mm') from dual;
121>.取时间点的日的写法:
select to_char(sys2003-10-17,'dd') from dual;
122>.取时间点的时的写法:
select to_char(sys2003-10-17,'hh24') from dual;
123>.取时间点的分的写法:
select to_char(sys2003-10-17,'mi') from dual;
124>.取时间点的秒的写法:
select to_char(sys2003-10-17,'ss') from dual;
125>.取时间点的日期的写法:
select trunc(sys2003-10-17) from dual;
126>.取时间点的时间的写法:
select to_char(sys2003-10-17,'hh24:mi:ss') from dual;
127>.日期,时间形态变为字符形态
select to_char(sys2003-10-17) from dual;
128>.将字符串转换成日期或时间形态:
select to_2003-10-17('2003/08/01') from dual;
129>.返回参数的星期几的写法:
select to_char(sys2003-10-17,'d') from dual;
130>.返回参数一年中的第几天的写法: select to_char(sys2003-10-17,'ddd') from dual;