MYSQL select where field does not contain a certain string character MYSQL select where field does not contain a certain string character database database

MYSQL select where field does not contain a certain string character


SELECT * FROM pages WHERE some_col NOT LIKE './%';

This will fetch all rows where some_col is not starting with ./


Use LIKE in mysql to check that it is not starting with ./. Use the code below

SELECT * FROM pages WHERE col_name NOT LIKE './%';

Hope this helps you


select * from pages where my_url NOT LIKE './%';