Saturday, 23 July 2016
Thursday, 16 June 2016
Thursday, 26 May 2016
How to select specific record from last or first
How to select specific record from last or first:
Select col1,col2,col3 from(selectcol1,col2,col3, row_number() over(order by col4,col5 desc) RN)
Where RN=2;
Note: to select second record from last
Select col1,col2,col3 from(selectcol1,col2,col3, row_number() over(order by col4,col5 desc) RN)
Where RN=2;
Note: to select second record from last
Monday, 8 February 2016
Create temporary table in Oracle
Temporary tables are stored in main memory which will be alive until the session expires. We can use like normal tables but these can not be permanent and can't reflect in the memory (Hard-disc).
Syntax:
Syntax:
SQL> CREATE GLOBAL TEMPORARY TABLE marks_tmp 2 ( std_id numeric(10) not null, 3 std_name varchar2(50) not null, 4 marks varchar2(50) 5 ) 6 / SQL> SQL>
Subscribe to:
Comments (Atom)





















