Answer Posted / kishore.p
select top 1 * from tblemp b where b.empsal not in(select
top n-1 empsal from tblemp e)
note:- here the n will be the number of only row you would
like to display.
here in the above case n=2 i.e., n-1=1
so this will be the querry:
select top 1 * from tblemp b where b.empsal not in(select
top 1 empsal from tblemp e)
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is sql in java?
What are sql triggers used for?
What is a recursive join sql?
How to display Row Number with Records in Oracle SQL Plus?
What is dcl in sql?
Can triggers stop a dml statement from executing on a table?
What is the difference between rollback and rollback to statements?
What are the two types of periodical indexes?
What does cursor do in sql?
How global cursor can be declare with dynamic trigger ?
What's the difference between a primary key and a clustered index?
how can you create an empty table from an existing table? : Sql dba
What is the difference between jpql and sql?
what are ddl statements in mysql? : Sql dba
How do I restart sql?