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

Enable OpenSSH on Windows 11

Step 1: Install OpenSSH Server You can do this via PowerShell (run as Administrator ): Check if it's already available: Get-WindowsCapab...