how to select 5 to 7 rows from a table, which contains 10 rows?

Answer Posted / sajida

select rnum, d.* from dept d, (select rownum rnum , deptno
from dept ) e
where d.deptno = e.deptno and rnum between 5 and 7;

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is user-defined function? Explain its types i.e. Scalar and inline table value user-defined function?

480


Explain what are commit and rollback in sql?

536


Difference between report and query parameter. Why do we need different type of parameter?

583


Why is there a performance difference between two similar queries where one uses union and the other uses union all?

520


How to create a login account in ms sql server to access the database engine using "create login" statements?

580






What are the events recorded in a transaction log?

514


Define model database?

581


What are the new features in SQL Server 2005 when compared to SQL Server 2000?

632


why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it? : Sql server administration

569


What is a mutating table error and how can you get around it?

548


What is the purpose of object explorer and its features? : sql server management studio

607


create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration

513


What is Replication?

647


Write a code to select distinct records without using the DISTINCT keyword.

656


How is sql server used?

556