Divi WordPress Theme

Topic: wildcard characters in LIKE clauses?  (Read 606 times)

Offline kavitajain9782

  • New Member
  • *
  • Posts: 26
  • iTrader: +0/-0
    • View Profile
wildcard characters in LIKE clauses?
« on: April 27, 2019, 01:19:26 PM »
Hello Dear,                   

               Please Tell Me What ways can we use wildcard characters in LIKE clauses?
VPS Hosting - AccuWebHosting

Offline ServersBase

  • New Member
  • *
  • Posts: 30
  • iTrader: +0/-0
    • View Profile
Re: wildcard characters in LIKE clauses?
« Reply #1 on: April 27, 2019, 10:42:24 PM »
%, _, [ ],-,^ these all are wild cards. All the wildcards can also be used in combinations.
for example:
WHERE CustomerName LIKE 'a%'   Finds any values that starts with "a"
WHERE CustomerName LIKE '%a'   Finds any values that ends with "a"
WHERE CustomerName LIKE '%or%'   Finds any values that have "or" in any position
WHERE CustomerName LIKE '_r%'   Finds any values that have "r" in the second position
WHERE CustomerName LIKE 'a_%_%'   Finds any values that starts with "a" and are at least 3 characters in length
WHERE CustomerName LIKE 'a%o'            Finds any values that starts with "a" and ends with "o"
Shopify Divi WordPress Theme
Tags: