SQL > SQL????? > Like

LIKE ? WHERE ???? ???? ?? ??? ????????. LIKE ? ???? ??? ??? ??? (pattern) ?? ??? ???? ??? ?? ???. ????? IN ? ????? ??? ??? ??? ??? ?? ???; BETWEEN) ? ????? ??? ??? ?????. LIKE ? ??? ??? ????:

SELECT "???"
FROM "???"
WHERE "???" LIKE {??};

{??}??? ?? (wildcard) ? ?? ?????. ??? ???? ????:

  • 'A_Z': :???? ??? 'A' ?? ???? 'Z' ?? ??? ?? ????. 'ABZ' ? 'A2Z' ?? ? ??? ?????, 'AKKZ'? ???? ????. A ? Z ??? ?? ?? ??? ??? ???????.).
  • 'ABC%': 'ABC' ? ???? ?? ?? ??. ?? ??, 'ABCD' ? 'ABCABC' ? ?? ? ??? ?????.
  • '%XYZ': 'XYZ' ? ??? ?? ?? ??. ?? ??, 'WXYZ' ? 'ZZXYZ' ? ?? ? ??? ?????.
  • '%AN%': 'AN'??? ???? ?? ????.?? ?? , 'LOS ANGELES' ? 'SAN FRANCISCO' ? ?? ? ??? ?????.

?? ??? ?? Store_Information ??? ?????:

Store_Information ??
Store_NameSalesTxn_Date
LOS ANGELES150005-Jan-1999
SAN DIEGO25007-Jan-1999
SAN FRANCISCO30008-Jan-1999
BOSTON70008-Jan-1999

??? ?????,

SELECT *
FROM Store_Information
WHERE Store_Name LIKE '%AN%';

??:

Store_Name Sales Txn_Date
LOS ANGELES 1500 Jan-05-1999
SAN DIEGO 250 Jan-07-1999
SAN FRANCISCO 300 Jan-08-1999

SQL ORDER BY >>
?


Copyright © 2021   1keydata.com   All Rights Reserved