I have a list of company names and want to display all the names starting with a specific character. deg.
So the request
SELECT * FROM company WHERE name LIKE 'd%'
But I also want companies starting with "The" so
SELECT * FROM company WHERE name LIKE 'd%' OR name LIKE 'The d%'
But now a tricky bit, when we get to 't', I want to delete all those that start with 'The' while saving others starting with 't' (and also keeping something like "The Truffle House", where the word " The "starts with" t ").
Any ideas? I would like to keep the logic in MySQL ...
source
share