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

Answer Posted / s. ramesh

select * from ( select rownum r, comp_name from metatest )
where r > 4 and r < 8;

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you please explain the difference between function and stored procedure?

547


Explain about SQLOS?

593


What is scan table/view and seek table/view when its occurs? : sql server database administration

539


What is sql or structured query language?

688


Explain what is dbcc?

597






Disadvantages of the indexes?

591


In which sql server version report builder introduced?

105


How can you insert values in multiple rows using one Insert statement?

622


What are examples of triggers?

618


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

560


What stored procedure can you use to display the current processes?

501


Some queries related to SQL

592


As per your opinion what are the five top responsibilities of a dba? : sql server database administration

614


how many triggers you can have on a table? : Sql server database administration

499


What is cube dimension? : sql server analysis services, ssas

538