Count(*) againt Top 1 in SQL Server -
this question has reply here:
fastest way determine if record exists 7 answerswe work tables lot of records. knows if improve create count(*) or top 1 know if specific record exists or grouping of records match conditions. type of sentence lock table or need specify no lock table.
if don't care possibility of dirty reads can seek
select top(1) yourtable (nolock) ..... (your conditions here)
sql-server count top-n
No comments:
Post a Comment