SQL查询将字符串转换成date类型
select * from emp where HIREDATE=str_to_date('1981-02-20','%Y-%m-%d');//mysql
或
select * from lccont where cvalidate=to_date('2018/1/27','yyyy/mm/dd');//Oracle
select * from emp where HIREDATE=str_to_date('1981-02-20','%Y-%m-%d');//mysql
或
select * from lccont where cvalidate=to_date('2018/1/27','yyyy/mm/dd');//Oracle
本文标题:字符串转换成date类型
本文链接:https://www.haomeiwen.com/subject/vhlyxftx.html
网友评论