A table has 150 records. How do you retrieve 100th row to
120th row from that table ?
Answers were Sorted based on User's Feedback
Answer / laks
select * from emp where rownum<121
minus(select * from emp where rownum<101)
| Is This Answer Correct ? | 34 Yes | 4 No |
Answer / swapna
select * from emp where rownum<121
minus (select * from empwhere rownum<100);
| Is This Answer Correct ? | 11 Yes | 6 No |
Answer / d
select *
from (select rownum row_num
,tab.*
from table tab)
where row_num between 100 and 120
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / subhradeep
select * from employees where rownum<102
minus(select * from employees where rownum<81)
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / gourav josih
select *from employees
where employee_id between 120 and 150;
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / nayana
select * from emp where rownum<121
minus(select * from emp where rownum<100)
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / arif hussain
select * from (
select ROW_NUMBER() over (order by tablename.columnname)as ronno,* from tablename )x
where ronno between 100 and 120
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / mohan
select * from table_name where rownum between 100 and 120;
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / anjana
Select *,row_number over(partition by departmentid order by empid)as rowid from employeeDept
where rowid between 100 and 120
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / srinivas
select * from(select <table_name>.*,rownum rn from <Table_name>) where rn between 100 and 120
| Is This Answer Correct ? | 0 Yes | 0 No |
Difference between NVL, NVL2 and NULLIF
Why is sharding used?
Why do we create stored procedures & functions in pl/sql and how are they different?
Difference between IN and EXISTS
how to create object in plsql
take one table is t1 and in that column name is f1 f1 column values are 200 5000 3000 7000 300 600 100 400 800 400 i want display the values asc and desc in a single output. sample output is f1.a 100 200 300 400 500 600 etc...... and f1.d is 5000 4000 3000 2000 1000 etc...
Write a sql select query that only returns each name only once from a table?
What do you understand by pl/sql packages?
what is d diff between grant,commit,rollback n savepoint
What is the difference between delete, truncate and drop command?
please explain database architecture..
Who developed sql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)