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 |
How is data stored on a disk?
TABLE A TABLE B EMPNO ENAME EMPNO ENAME 1 A 1 A 2 B 2 B 3 C 3 C 4 D 4 D 5 E 5 E 6 F 7 G HOW TO GET THE UNMATCHED RECORDS IN SQL QUERY?
Why do we use %rowtype & %type in plsql?
How do you modify a column in sql?
How many functions are there in sql?
What problem one might face while writing log information to a data-base table in pl/sql?
In table a 1lakh data is present,in table b 20 thousand data is present, to get unique data from table a and b which join to be considered. whether right outer join or left inner join.
Explain the uses of a database trigger?
What are database links used for?
What is acid property in a database?
write a query to delete similar records in different tables with same structure
What are aggregate and scalar functions?