I want to sort a MySQL table using ALTER TABLE (so it stays sorted), and it works fine when I simply put in 1 column name like this:
ALTER TABLE data ORDER BY upvotes DESC;
But I want to sort it based upon the difference of two values, and when I do that I get "Unrecognized alter operation."
This is the code I want to work:
ALTER TABLE data ORDER BY (upvotes-downvotes) DESC;
Is there a way to do this, or am I just getting the syntax wrong? Thanks in advance!