码迷,mamicode.com
首页 > 其他好文 > 详细

to_char与to_date的区别

时间:2018-07-31 21:38:26      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:类型   where   日期类型   cse   字符串转换   to_date   end   har   转换   

select * from csend where credttm > to_date(‘2018-06-11‘,‘yyyy-mm-dd‘);


select * from csend where to_char(credttm,‘yyyy-mm-dd‘)>‘2018-06-25‘

 

结论:to char 是把日期或数字转换为字符串
to date 是把字符串转换为数据库中得日期类型

to_char与to_date的区别

标签:类型   where   日期类型   cse   字符串转换   to_date   end   har   转换   

原文地址:https://www.cnblogs.com/wulihong/p/9397532.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!