How to find rows that contains '%'
symbol in a column of table.
For example, I have a column containing data as 'amylase 50% of dose'
.
How to select and filter all the rows containing %
symbol in a given column?
try this query
select * from tablename where columnname like '%[%]%'
You can use WHERE Id LIKE '%[%]%'
. An example will be something like this:
CREATE TABLE #Test
(
Id NVARCHAR(100)
)
INSERT INTO #Test VALUES ('100%'), ('1000')
SELECT * FROM #Test
WHERE Id LIKE '%[%]%'
DROP TABLE #Test
OUTPUT:
Id
100%
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With