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 |
sasan_vm
Yak Posting Veteran
51 Posts |
Posted - 2012-04-27 : 04:53:25
|
Hi,I want to select 1 record in table with million records, in conditionsection use unique index to select record. Is any different to use SELECT vs SELECT TOP 1:SELECT * FROM [table_name] WHERE [unique_field] = @paramvsSELECT TOP 1 * FROM [table_name] WHERE [unique_field] = @param Regards,sasan. |
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2012-04-27 : 06:28:32
|
No- LumbagoMy blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/ |
 |
|
vinu.vijayan
Posting Yak Master
227 Posts |
Posted - 2012-04-28 : 07:39:24
|
Both queries are same. Check the Execution plans and Statistics to know for yourself.N 28° 33' 11.93148"E 77° 14' 33.66384" |
 |
|
|
|
|