PATINDEX: searchs for a pattern of characters within a string : PATINDEX « String Functions « SQL Server / T-SQL






PATINDEX: searchs for a pattern of characters within a string

1> --PATINDEX: searchs for a pattern of characters within a string.
2> -- return 0 if no match is found.
3>
4> SELECT PATINDEX("%SQL%","SQL server sql server")
5>
6> GO

-----------
          1

(1 rows affected)
1>

           
       








Related examples in the same category

1.PATINDEX('%M_rs%', 'The stars near Mars are far from ours')