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 |
|
BCJ
Starting Member
42 Posts |
Posted - 2008-06-18 : 12:22:43
|
| Hi,how to restrict the query to select only one row .....thanks. |
|
|
jdaman
Constraint Violating Yak Guru
354 Posts |
Posted - 2008-06-18 : 12:37:05
|
| If you just want a single random row from a table you can do the following: select top 1 * from tableIf you want to select a specific row from a table you will need to give more information for a good answer. |
 |
|
|
BCJ
Starting Member
42 Posts |
Posted - 2008-06-18 : 12:48:09
|
| i just trying for a random record, thanks a lot |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-06-18 : 12:58:21
|
| IF you want to get a random row, useselect top 1 * from table order by newid()MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|