Saturday, July 22, 2023

BEST SQL practice In Oracle Database

 sysdate  - interval '2' hour;

sysdate - interval '2' day;

sysdate - interval '2' month;

sysdate - interval '2' minute;

sysdate - interval '2' second;


---- to enable and disable history on SQLPLUS 

history;

show history;

hist clear;

hist;

set history off;

set history on;


--- fetch or rownum ---

fetch next n rows;

fetch first n rows;

fetch next n rows only;

fetch first n percent rows only;

offset n rows fetch next n rows only;


you can use gv_$view_name instead of gv$view_name 

No comments:

Post a Comment

opatchauto

# Log in as root su - root # Execute opatchauto against the unzipped patch directory /u01/app/19.0.0/ grid /OPatch/opatchauto apply /tmp/pat...