Your best bet might be to have a title prefix field which contains entries like The
, A
, An
etc. that you don't wish to consider for alphabetizing. Other suggestions noted here can work, however they would disallow the use of an index for sorting, which could be very problematic for your application if you have large number of rows. In this case the query might look like
SELECT CONCAT(title_prefix, title) AS `full_title`, ...
FROM table
ORDER BY title ASC
Modifying your existing table to accommodate this approach would be simple. Simply add the name column, then run a few updates like
UPDATE table SET title_prefix = 'The ', title = SUBSTR(title, 4) WHERE title LIKE 'The %';
UPDATE table SET title_prefix = 'A ', title = SUBSTR(title, 2) WHERE title LIKE 'A %';
UPDATE table SET title_prefix = 'An ', title = SUBSTR(title, 3) WHERE title LIKE 'An %';
Even if you don't want a separate field, you could use similar update logic to move the prefixes to the end of the title name like this
UPDATE table SET title = CONCAT(SUBSTR(title, 4), 'The, ') WHERE title LIKE 'The %';
etc.
Either way would allow you to sort by title
while also utilizing an index.