LIKE for Range Of Values in Teradata

Like in regular expression, we can use LIKE in Teradata SQL also to match the range of characters. Example, [a-z] means all characters between 'a' and 'z'.

Example:
SELECT * FROM TBL_MYTABLE WHERE MYCOL LIKE '[a-s]%' 


In the above examples, we have selected all rows for which my column starts with any character between 'a' and 's'.

we can also exclude those rows for which MYCOL does not start with any character in the range of characters from 'a' to 's'.

SELECT * FROM TBL_MYTABLE WHERE MYCOL LIKE '[^a-s]%'