I\'ve just come across this in a WHERE clause:
AND NOT (t.id = @id)
How does this compare with:
AND t.id != @id
These 3 will get the same exact execution plan
declare @id varchar(40)
select @id = '172-32-1176'
select * from authors
where au_id <> @id
select * from authors
where au_id != @id
select * from authors
where not (au_id = @id)
It will also depend on the selectivity of the index itself of course. I always use au_id <> @id myself