Posted By

jaytee on 09/17/08


Tagged


Versions (?)

Test PL/SQL syntax highlighting


 / Published in: PL/SQL
 

  1. number1 NUMBER(2);
  2. number2 NUMBER(2) := 17;
  3. text1 VARCHAR2(12) := 'Hello world';
  4. text2 DATE := SYSDATE; -- current date and time
  5. SELECT street_number
  6. INTO number1
  7. FROM address
  8. WHERE name = 'Smith';

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: inventorstechnologies on December 24, 2008

To get n th row in a table :

select * from tt a where &n = (select count(rowid) from tt where rowid

Posted By: inventorstechnologies on December 24, 2008

To get last row in a table :

select * from tt where rowid = (select max(rowid) from tt);

http://www.inventorstechnologies.com

Posted By: inventorstechnologies on December 24, 2008

To get second max sal in a table :

select max(sal) from tt where sal

You need to login to post a comment.