In a mysql table I have, I want to select all the rows and all the columns, but by ordering them by the difference between the values of two values of the same column. Is there a way to write such an SQL query? Thank you very much!
SELECT * FROM MyTable ORDER BY (ColumnA - ColumnB)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.