Thread: SQL Syntax Help
View Single Post
  #6 (permalink)  
Old 02-01-09, 10:50
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,307
Be aware that the LIKE solution doesn't scale well. It guarantees a table scan, so on large tables it will be slow.

The solution that Thrasymachus proposed works against a column value instead of an expression, so it can use indicies. It will scale well against the largest tables you can create using SQL Server.

-PatP
Reply With Quote