C chuyuan Unregistered / Unconfirmed GUEST, unregistred user! 2006-02-25 #1 我知道 '' as ab1,0 as ab2 可以建立字符和數值型字段. 可是日期型如何寫? 謝謝
B bbscom Unregistered / Unconfirmed GUEST, unregistred user! 2006-02-25 #2 SELECT CAST('1900/1/1' AS datetime) AS DT 或 SELECT CAST('' AS DATETIME) AS DT 上面兩個是一樣的結果。 QQ:136293586
SELECT CAST('1900/1/1' AS datetime) AS DT 或 SELECT CAST('' AS DATETIME) AS DT 上面兩個是一樣的結果。 QQ:136293586
宏 宏 Unregistered / Unconfirmed GUEST, unregistred user! 2006-02-25 #3 select cast('' as datetime) as b1 from table1
I icelovey Unregistered / Unconfirmed GUEST, unregistred user! 2006-02-25 #4 select convert(datetime,'') as b1 from table1 或者 select convert(datetime,'2000/01/01') as b1 from table1
select convert(datetime,'') as b1 from table1 或者 select convert(datetime,'2000/01/01') as b1 from table1