------------转换函数----------------
/*
类似于java中的强转
公式:
cast(表达式 as 数据类型)
*/
-- double转int
select cast(12.34 as int);
-- string转int
select cast('1234' as int) + 10;
-- string转日期
select cast('2020-12-23' as date);
------------转换函数----------------
/*
类似于java中的强转
公式:
cast(表达式 as 数据类型)
*/
-- double转int
select cast(12.34 as int);
-- string转int
select cast('1234' as int) + 10;
-- string转日期
select cast('2020-12-23' as date);
本文标题:2022-03-07 转换函数
本文链接:https://www.haomeiwen.com/subject/lyynrrtx.html
网友评论