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

What is normalization? Describe its different types.

577


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

563


What are distributed partitioned views?

610


How you trouble shoot when any job fails

1499


How to use the inserted and deleted pseudo tables?

535






What is cross join in sql server joins?

586


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

555


What is sql or structured query language?

671


What is the difference between insensitive and scroll cursor?

574


Which language is supported by sql server?

548


there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration

475


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

527


What are “phantom rows”?

1235


What are .mdf files?

515


What is the tcp/ip port on which sql server runs?

560