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 |
|
kevison
Starting Member
5 Posts |
Posted - 2008-03-07 : 11:13:25
|
| Using MS SQLServer 2000Is there a way to create a query that will return only 1 row within a join for example:select a,b,c,dfrom tbl1inner join tbl2 on top 1 tbl2.a = tbl1.a <-- return only the top record here...I dont have too much of a problem with joins... however I was wondering if there was a mechanism to just specify what would be the top most record from a join clause.thanksKevin |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-03-07 : 11:19:16
|
TOP clause is applicable while projecting data not while joining tables.SELECT TOP 1 *from t1 join t2.... Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|