SQL

SELECT * FROM MyTable WHERE dataCol LIKE '%[%]%'

See more:

Hello,

My column consists of a special character % in some of records.... Now i want an SQl query to list out the records which cotains % symbol

**NOTE:** I need a query which will be searched with **like **operator

My column consists of a special character % in some of records.... Now i want an SQl query to list out the records which cotains % symbol

Below Query will give you all students having % character in their name

Hope this helps

select * from Student WHERE CHARINDEX('%',[Student Name],0)>1

Hope this helps

Permalink

Share this answer

Use [%]

http://stackoverflow.com/questions/7191449/how-do-i-escape-a-percentage-sign-in-t-sql[^]

http://stackoverflow.com/questions/7736956/query-to-find-columns-that-end-with-percent-symbol[^]

http://stackoverflow.com/questions/7191449/how-do-i-escape-a-percentage-sign-in-t-sql[^]

http://stackoverflow.com/questions/7736956/query-to-find-columns-that-end-with-percent-symbol[^]

Permalink

Share this answer

try this

or use this

SQL

select x from users where columnToBeSearched like '%[%]%' OR otherColumnToBeSearched like '%[%]%'

or use this

SQL

SELECT * FROM TABLE WHERE COLUMN_NAME LIKE '%[^a-zA-Z0-9]%'

Permalink

Share this answer

v2

hi

please try this.may It helps you

suppose column contains value as

1234%

11

121

1

and so on...........

and you need to find the value which contain % in that value.

plz try this query

SELECT * FROM tablename WHERE fieldname LIKE ‘%1234[%]%’

plz mark as complete if t helps you

please try this.may It helps you

suppose column contains value as

1234%

11

121

1

and so on...........

and you need to find the value which contain % in that value.

plz try this query

SELECT * FROM tablename WHERE fieldname LIKE ‘%1234[%]%’

plz mark as complete if t helps you

Permalink

Share this answer

hi

please try this

suppose column contains value as

1234%

11

121

1

and so on...........

and you need to find the value which contain % in that value.

plz try this query

SELECT * FROM tablename WHERE fieldname LIKE ‘%1234[%]%’

plz mark as complete if t helps you

please try this

suppose column contains value as

1234%

11

121

1

and so on...........

and you need to find the value which contain % in that value.

plz try this query

SELECT * FROM tablename WHERE fieldname LIKE ‘%1234[%]%’

plz mark as complete if t helps you

Permalink

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject,
20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8
+1 (416) 849-8900