当增改查的时候,to_char和to_date的用法
select to_char(sysdate,'yyyy-mm-dd') from dual
update teachers set hire_date=to_date('2012-06-01','yyyy-mm-dd') where teacher_id=12
insert into teachers (teacher_id,name,hire_date)values(13,'13',to_date('2012-06-06','yyyy-mm-dd'))
本文详细介绍了SQL中to_char和to_date函数的使用方法,通过具体示例展示了如何将日期转换为字符串和字符串转换为日期。
2148

被折叠的 条评论
为什么被折叠?



