Executing the following query:
SELECT title FROM table ORDER BY title
gives me:
"Hello" "Zebra" Apple Beta Cactus
How should I ORDER the first alphabetical character to get:
Apple Beta Cactus "Hello" "Zebra"
?
You will need to remove the quotes before sorting the data. You can easily remove them using a function TRIMin MySQL like:
TRIM
SELECT title FROM table ORDER BY TRIM(BOTH '"' FROM title);
...ORDER BY REPLACE(title, '"', '');
SELECT title FROM table ORDER BY TRIM(LEADING '"' FROM title)