suppose we have a table in which 200 rows. i want to find
101 row ? what the query....
and how we find 4th and 5th highest salary and 1 to 10
highest salary

Answer Posted / vishnu

if you have table temp_test1

you fire
select * from temp_test1
now you want 101 rows
basic thing here is records are sorted by rowid as per
insertion

for 101 th row

select * from temp_test1 where rowid in(
(select max(rowidtochar(rowid)) from temp_test1 where
rownum<102))
this is asked in tech mahindra

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use joins in subquery?

794


What is the usage of the distinct keyword?

887


Which function is used to return remainder in a division operator in sql?

782


What is field delimiter?

791


What are all the ddl commands?

852






What is auto increment in sql?

817


What is the syntax and use of the coalesce function?

808


What is difference between cursor and trigger?

758


How do I view a sql database?

746


Sql technical questions

997


How can I get the number of records affected by a stored procedure?

762


Is sqlite free?

716


What operators deal with null?

811


Why trigger is used in sql?

688


How do you run a query?

764