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 |
ranjeetsingh_6
Posting Yak Master
125 Posts |
Posted - 2006-09-04 : 02:21:21
|
Hi I have a Table VEHICLETRACK and data in it. I want to get dataaccording to rowid of each row like thisselect * from VEHICLETRACK where rowid=1How can i do it in SQL server 2000Ranjeet Kumar Singh |
|
jonasalbert20
Constraint Violating Yak Guru
300 Posts |
Posted - 2006-09-04 : 02:22:54
|
have you used an identity column? you can utilized it if you want.Want Philippines to become 1st World COuntry? Go for World War 3... |
 |
|
ranjeetsingh_6
Posting Yak Master
125 Posts |
Posted - 2006-09-04 : 02:25:58
|
noRanjeet Kumar Singh |
 |
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2006-09-04 : 02:29:09
|
u can use timestamp select * from VEHICLETRACK where timestamp =1 |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-09-04 : 02:30:47
|
records are not stored in a table in any particular order. You determine how the sequence of records during retrieving using the ORDER BY.select * from customer order by customer_name desc So this means there isn't such things as first or last record in a table.However there are some "work-around" to obtain the Nth record no. You can refer to this thread http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=71465 KH |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-09-04 : 02:31:02
|
You can also do this by ordering by other entity.SELECT TOP 1 * FROM VehicleTrack ORDER BY SomeID_column.Peter LarssonHelsingborg, Sweden |
 |
|
ranjeetsingh_6
Posting Yak Master
125 Posts |
Posted - 2006-09-04 : 02:45:32
|
Thanks My problem have solvedRanjeet Kumar Singh |
 |
|
|
|
|