orcl常用小命令。。。

阅读更多

create user identified by ;
grant connect,resource,dba to ;
revoke connect,.. from ;
drop user ;
create role ;
grant select,insert,update,delete on to ;
drop role ;
grant to ;
grant select,insert,update,delete on test to chu;
revoke select,insert,update,delete on test from chu
-------------------------------------------------------------------
查询出udeclare中,当前时间往前15天10小时20分15秒的申请记录,根据column_name.
SELECT * FROM
WHERE column_name<= SYSDATE
AND column_name>= SYSDATE-NUMTODSINTERVAL(15*24*3600+10*3600+20*60+15,'SECOND'); 
-------------------------------------------------------------------
查询10秒前的数据
SELECT *
  FROM AS OF TIMESTAMP(SYSTIMESTAMP - INTERVAL '10000' SECOND)
   WHERE ...;
当然表结构未改动是前提
-------------------------------------------------------------------

你可能感兴趣的:(Oracle)