Click here to Skip to main content
15,905,028 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How efficient is the LIKE keyword when used to locate records in database as compared to the using '=' in a where clause.

Put differently, how well the LIKE keyword be used to locate record as compared with the '=' symbol?
Posted

LIKE is good to used only against static values. It should be avoided to used against a database.

and "=" operator is more efficient than LIKE in terms of performance.


The only advantage you get with LIKE is to search the matching values with wildcards "%","_",".*" etc , which you can not do with "=".

use-or-like-to-compare-strings-in-sql[^]

sql-like-vs-performance[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900