
SQL: Using where clause with not like, underscore operators
SQL Wildcard & Special Operator : Exercise-13 with Solution
Write a SQL statement to find those rows from the table testtable which does not contain the character underscore ( _ ) in its column 'col1'.
Sample table: testtable
Sample Solution :
SELECT *
FROM testtable
WHERE col1 NOT LIKE '%/_%' ESCAPE '/';
Output of the Query:
col1 A001/DJ-402%45\2015/200 A001/DJ-402\44
Explanation :

Pictorial presentation :

Query Visualization:
Duration:

Rows:

Cost:

Practice Online
Contribute your code and comments through Disqus.
Previous: Write a SQL statement to find those rows from the table testtable which contain the escape character underscore ( _ ) in its column 'col1'.
Next: Write a SQL statement to find those rows from the table testtable which contain the escape character ( / ) in its column 'col1'.
What is the difficulty level of this exercise?
New Content: Composer: Dependency manager for PHP, R Programming