adspace


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

what are the advantages of sql ? : Sql dba

1154


Can delete statement be rollbacked?

1065


what is schema? : Sql dba

1163


what is collation? : Sql dba

1242


how to escape special characters in sql statements? : Sql dba

1124


what is bcp? When does it used? : Sql dba

1065


What is the current version of postgresql?

1188


what is sql server agent? : Sql dba

1188


If a cursor is open, how can we find in a pl/sql block?

1252


how to use regular expression in pattern match conditions? : Sql dba

1125


what are all the common sql function? : Sql dba

1141


how many tables will create when we create table, what are they? : Sql dba

1155


Is primary key clustered index?

1027


What is the best sql course?

1062


Can we rollback truncate?

1083