Saturday 13 July 2013

Search for % or ' in sql table

select * from TableName where ColumnName like '%[%]%' or  prof like '%['']%'


Symbol        Meaning
LIKE '5[%]'                     5%
LIKE '[_]n'         _n
LIKE '[a-cdf]'         a, b, c, d, or f
LIKE '[-acdf]'        -, a, c, d, or f
LIKE '[ [ ]'        [
LIKE 'abc[_]d%'        abc_d and abc_de
LIKE 'abc[def]'        abcd, abce, and abcf

No comments:

Post a Comment

C# LINQ Joins With SQL

There are  Different Types of SQL Joins  which are used to query data from more than one database tables. In this article, you will learn a...