SQL > SQL Commands > LikeLIKE is another keyword that is used in the WHERE clause. Basically, LIKE allows you to do a search based on a pattern rather than specifying exactly what is desired (as in IN) or spell out a range (as in BETWEEN). The syntax is as follows:
SELECT "column_name"
{PATTERN} often consists of wildcards. We saw several examples of wildcard matching in the previous section. Below we use an example to see how wildcard is used in conjunction withLIKE:FROM "table_name" WHERE "column_name" LIKE {PATTERN}; Table Store_Information
SELECT *
Result:FROM Store_Information WHERE Store_Name LIKE '%AN%';
|
Saturday, 13 December 2014
SQL LIKE
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment