Hi Everyone,
How to get fist and last record from a table in oracle?
Thanks in advance
Answer Posted / rajesh venati
this will also work
select * from table_name where rowid=(select min(rowid) from
table_name)
union
select * from table_name where rowid=(select max(rowid) from
table_name);
| Is This Answer Correct ? | 23 Yes | 2 No |
Post New Answer View All Answers
Explain character-manipulation functions?
how to drop an existing index in mysql? : Sql dba
What is sql*plus?
Explian rowid, rownum?
What are the basic techniques of indexing?
Is sql an operating system?
First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.
Can we rename a column in the output of sql query?
How do you update a table in sql?
Explain how can you save or place your msg in a table?
How to write pl sql program in mysql command prompt?
what are the differences between procedure-oriented languages and object-oriented languages? : Sql dba
How do you modify a column in sql?
What is the execution plan in sql?
Is sql considered coding?