如下表:

MySQL中,把varchar类型转为date类型

先使用str_to_date函数,将其varchar类型转为日期类型,然后从小到大排序

语法:select str_to_date(class_time,'%Y%m%d %H:%i:%s') a from a order by  a desc ;

MySQL中,把varchar类型转为date类型

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-21
  • 2021-09-22
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2022-12-23
  • 2021-06-24
相关资源
相似解决方案