//CAST(表达式 AS 数据类型)
源代码:
SELECT StudentName + ‘的出生日期是‘ +CAST(BornDate as varchar(50)) AS ‘学生信息‘
FROM Student
//CONVERT(数据类型,表达式,样式 )
SELECT StudentName,CONVERT(varchar(50),BornDate,102) AS 出生日期
FROM Student
原文地址:https://www.cnblogs.com/wangzhaofang/p/8297944.html
时间: 2024-09-28 22:13:53