Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to retrive a top2 records from table

Author  Topic 

madhu.paddu
Starting Member

6 Posts

Posted - 2007-12-20 : 01:50:12
hi friends
can any one give syntax/suggestion to retrive the top two records from a table.

regrads
madhu

nukala

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2007-12-20 : 01:52:20
Select Top 2 * From YourTable

Chirag

http://www.chirikworld.com
Go to Top of Page

madhu.paddu
Starting Member

6 Posts

Posted - 2007-12-20 : 01:55:59
how to get the records in pl/sql

nukala
Go to Top of Page

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2007-12-20 : 02:23:05
This is not an Oracle Forums, for Oracle related queries you can check out

www.dbforums.com

just a shot..

Select * From YourTable Where RowNum <=2

I m not sure whether it will work or not.. !!!

Chirag

http://www.chirikworld.com
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-12-20 : 03:24:07
quote:
Originally posted by madhu.paddu

how to get the records in pl/sql

nukala


I think you can use LIMIT function
As said post your question at Oracle forums

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2007-12-20 : 04:13:22
quote:
Originally posted by chiragkhabaria

This is not an Oracle Forums, for Oracle related queries you can check out

www.dbforums.com

just a shot..

Select * From YourTable Where RowNum <=2

I m not sure whether it will work or not.. !!!

Chirag

http://www.chirikworld.com



correct one

Vinod
Even you learn 1%, Learn it with 100% confidence.
Go to Top of Page
   

- Advertisement -