1、语法:cast(字段名 as 数据类型 )
2、作用:将某种数据类型的表达式显式转换为另一种数据类型
3、samples:将时间戳转为text类型,并提取其中的日期字段
select substring(cast(insert_time as text),12,2 )as date from table1;
1、语法:cast(字段名 as 数据类型 )
2、作用:将某种数据类型的表达式显式转换为另一种数据类型
3、samples:将时间戳转为text类型,并提取其中的日期字段
select substring(cast(insert_time as text),12,2 )as date from table1;