select playing_time from video order by playing_time desc;
The column type of playing_time is varchar(25)
Sample Data
01:05:22
21:08
07:52
04:31
The query dont work it does not order by highest time
how i can solve this problem ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would go for changing the column type used for storing the duration from
varchartounsigned intand hold the length in seconds. This way you know exactly what you have stored there. Right now, you have to treat differently the (at least) 2 formats you have there: (21:08 and 01:05:22)