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.
Author |
Topic |
ReLski
Starting Member
5 Posts |
Posted - 2011-01-12 : 19:44:20
|
How To get the first data in a table using stored procedures? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-01-14 : 05:23:12
|
quote: Originally posted by tkizer
quote: Originally posted by dataguru1971 That depends.Select top 1 * from tablewill return the 1st row..but depending on if there is a clustered index etc, it may not be the "first row".
Clustered index or not, you still need an ORDER BY.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
It seems the post was deleted.I agree with you. Dont reply on default ordering. If you want data with specific order, always use ORDER BY Clause.MadhivananFailing to plan is Planning to fail |
|
|
|
|
|