Regular expressions inside SQL Server

前端 未结 5 1120
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-08 14:34

I have stored values in my database that look like 5XXXXXX, where X can be any digit. In other words, I need to match incoming SQL query strings li

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-08 15:18

    SQL Wildcards are enough for this purpose. Follow this link: http://www.w3schools.com/SQL/sql_wildcards.asp

    you need to use a query like this:

    select * from mytable where msisdn like '%7%'
    

    or

    select * from mytable where msisdn like '56655%'
    

提交回复
热议问题