嗨......
如何通过在sql server 2008中传递相应的月份数来获得月份名称..
事先提前......答案 0 :(得分:6)
SELECT DATENAME(month, <fieldname>) AS "Month Name" FROM <tablename>
例如:
SELECT DATENAME(month, JoinDate) AS "Month Name" FROM EMPLOYEE
此值将返回与表格EMPLOYEE
中 JoinDate 字段中的日期值对应的月份名称。