orcl常用小命令。。。
create user <username> identified by <password>;
grant connect,resource,dba to <username>;
revoke connect,.. from <username>;
drop user <username>;
create role <rolename>;
grant select,insert,update,delete on <tables> to <rolename>;
drop role <rolename>;
grant <rolenames> to <username>;
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 <table_name>
WHERE column_name<= SYSDATE
AND column_name>= SYSDATE-NUMTODSINTERVAL(15*24*3600+10*3600+20*60+15,'SECOND');
-------------------------------
查询10秒前的数据
SELECT *
FROM <table_name> AS OF TIMESTAMP(SYSTIMESTAMP - INTERVAL '10000' SECOND)
WHERE ...;
当然表结构未改动是前提
-------------------------------