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:27:33
|
| Hi,how to restrict the query to select only one row .....thanks. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-18 : 12:47:47
|
| SELECT TOP 1 fields FROM Table WHERE conditions ORDER BY field |
 |
|
|
BCJ
Starting Member
42 Posts |
Posted - 2008-06-18 : 12:49:12
|
| Thanks a lot |
 |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2008-06-18 : 12:49:52
|
| duplicate posthttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=105088 |
 |
|
|
jkarthik86
Starting Member
1 Post |
Posted - 2008-06-18 : 12:59:18
|
quote: Originally posted by visakh16 SELECT TOP 1 fields FROM Table WHERE conditions ORDER BY field
We can go for top 1 Query that is Select top 1 from Tablename where Condition |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-18 : 13:00:53
|
quote: Originally posted by jkarthik86
quote: Originally posted by visakh16 SELECT TOP 1 fields FROM Table WHERE conditions ORDER BY field
We can go for top 1 Query that is Select top 1 fields/* from Tablename where Condition
should specify the reqd fields or * too |
 |
|
|
|
|
|