I have to create an SQL Query to get all rows starting with a specific character, except if the parameter passed to the (PHP) function is 0, in that case it should get every row that does not start with A - Z (like #0-9.,$ etc).
What is the easiest and fastest way to get those rows?
DB: MySQL 5.1
Column: title
SELECT *
FROM mytable
WHERE title NOT RLIKE '^[A-Z]'
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