LIKE with ESCAPE SEQUENCE in Teradata

You can do that using escape operator after the filter criteria. Let us see an example in which '%' and '_' can be part of our data. We want to select only those rows which contain these characters as data.

SELECT * FROM TBL_MyTable where MyCol LIKE '%[\%\_]%' ESCAPE '\'

It must be remembered that using more than one character as escape sequence results in Error.