Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Who wrote this Article on SQL Server best practices

$
0
0

I saw an article on SQL Server Best Practices.  This article reported

When possible, use WHERE clauses that compare a column to a value. Example: WHERE SUBSTRING(firstname,1,1) = 'm' can be rewritten as WHERE firstname like 'm% or WHERE DATEDIFF(yy,dateofbirth,GETDATE()) > 21 should be rewritten as WHERE dateofbirth< DATEADD(yy,-21,GETDATE()). This will allow the query to use an index seek to accelerate the processing rather relying on a table scan.

However I've not been able to relocate that article for purposes of citation.

Can anyone recall seein that article?


Edward R. Joell MCSD MCDBA


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>