- timestamp类型转date类型
select cast(current_timestamp as date) from dual;
注意:在比较的时候,如果是字符串和date比较会报错,所以可能需要如上的转换。
错误提示如下:
Type CHAR(10) cannot be compared with type DATE.
select cast(current_timestamp as date) from dual;
注意:在比较的时候,如果是字符串和date比较会报错,所以可能需要如上的转换。
错误提示如下:
Type CHAR(10) cannot be compared with type DATE.