How to search for "%" in sql table-column
I have a table with a column "Remarks"..开发者_Python百科.How to search "%" in this column?
Like this
where Remarks like'%[%]%'
you need to put brackets around it, more info here LIKE (Transact-SQL)
SELECT *
FROM YourTable
WHERE CHARINDEX('%', Remarks) > 0
there are 2 ways, you could use
where Remarks like '%[%]%'
or
where Remarks like '%!%%' escape '!'
精彩评论