//CAST(表达式 AS 数据类型)
源代码:
SELECT StudentName + ‘的出生日期是‘ +CAST(BornDate as varchar(50)) AS ‘学生信息‘
FROM Student
//CONVERT(数据类型,表达式,样式 )
SELECT StudentName,CONVERT(varchar(50),BornDate,102) AS 出生日期
FROM Student
标签:arc body date blog 样式 sele 类型转换 student post
//CAST(表达式 AS 数据类型)
源代码:
SELECT StudentName + ‘的出生日期是‘ +CAST(BornDate as varchar(50)) AS ‘学生信息‘
FROM Student
//CONVERT(数据类型,表达式,样式 )
SELECT StudentName,CONVERT(varchar(50),BornDate,102) AS 出生日期
FROM Student
标签:arc body date blog 样式 sele 类型转换 student post
原文地址:https://www.cnblogs.com/wangzhaofang/p/8297944.html