Oracle basic
Create Sequence:
create sequence SEQ_NAME minvalue 1 maxvalue 9999999999 start with 1 increment by 1 cache 100;
Delete data:
truncate table TABLE_NAME; delete table TABLE_NAME
Get system date:
select to_char(sysdate, 'yyyymmddhhmmss') from dual; --9i以下(包含9i?)使用此,不能得到毫秒 select my_timestamp,to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') ORACLE_TIME from dual; --9i以上版本使用,可以得到毫秒
产生随机数:
SELECT dbms_random.value(10,20) FROM dual;
日期比较:
select * from up_date where update < to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
路慢慢其休远羲,吾将上下而求所