I’m using mysql and one of my table’s is like this
(sno , roll_no , name , mail_id , m_date)
(1 , 1111 , Harry , [email protected] , 2024-08-12)
(2 , 123142 , Sam , [email protected] , 2024-08-16)
(3 , 2352 , YT , [email protected] , 2024-08-14)
I want to rearrange this according to date maintaining the sno order. NOTE: sno and roll_no are primary keys and sno has attribute auto increment.
Desired result
(sno , roll_no , name , mail_id , m_date)
(1 , 1111 , Harry , [email protected] , 2024-08-12)
(2 , 2352 , YT , [email protected] , 2024-08-14)
(3 , 123142 , Sam , [email protected] , 2024-08-16)
Is there any mysql query using which this can be done (I want to change my table in this way and doesn’t want to display this output)
New contributor
drowsy titan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.