Answer Posted / nilesh
hi all,
This will also work fine, try it
select top 1 * from (select top 2 * from table_name)as set
order by set.col_name desc
here table_name is the name of the table from which
you want to retrive the record.
And col_name is the column name by which you are sorting
the records
If it found wrong plz correct it....
and show it on this site
| Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
Is a secondary key the same as a foreign key?
how to fetch alternate records from a table? : Sql dba
How many parts of a pl sql block are optional?
What is compilation error in pl sql?
how to calculate the difference between two dates? : Sql dba
What is a pdo connection?
What is sql scripting?
What is normalisation and its types?
how to include comments in sql statements? : Sql dba
How many sql databases can you have on one server?
Does execute immediate commit?
What is rank () in sql?
Which is faster truncate or drop?
What are the query optimization techniques?
Can we declare a column having number data type and its scale is larger than pricesionex: column_name number(10,100),column_name numbaer(10,-84)