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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-07-06 : 07:45:40
|
| George writes "I was wondering if there is performance difference when using SET or SELECT to set a variable. For example:Is this faster?select top 1 @an_id = an_id from SomeTable with(nolock) where a_field = @a_fieldOr is this faster?set @an_id = (select an_id from SomeTable with(nolock) where afield = @a_field)Thanks" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|