SQL LIKE clause in Sqlserver

Total Post:341

Points:2389
 1237  View(s)
Ratings:
Rate this:
i want to use  LIKE clause How to use .
  1. Post:286

    Points:2044
    Re: SQL LIKE clause in Sqlserver

    The SQL LIKE clause is used to compare a value to similar values using wildcard operators. There are two wildcards used in conjunction with the LIKE operator:
    The percent sign (%)
    The underscore (_)
    The percent sign represents zero, one, or multiple characters. The underscore represents a single number or character. The symbols can be used in combinations.

    SELECT * FROM Customer

    WHERE CustomerName LIKE 'a%'

    GO

    SELECT * FROM Customer

    WHERE CustomerName LIKE '%a%'

    Go

    SELECT * FROM Customer

    WHERE CustomerName LIKE 'a_'

    Go

    SELECT * FROM Customer

    WHERE CustomerName LIKE '_a'

    GO

    SELECT * FROM Customer

    WHERE CustomerName LIKE '_a_'

     

      Modified On Apr-10-2018 06:03:26 AM

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.