Tips 1.如何取得欄位中含有小數(非整數)的資料集
SELECT * FROM EXP_TABLE WHERE COLUMN_A > FLOOR(COLUMN_A)
Tips 2.亂數排序取回的資料集順序
SELECT *, NEWID() AS NEWID FROM EXP_TABLE ORDER BY NEWID
Tips 3.將yyyyMMddHHmmss轉換為DateTime型別
SELECT CONVERT(DATETIME, STUFF(STUFF(STUFF('20120511115720', 9, 0, ' '), 12, 0, ':'), 15, 0, ':'))
持續更新...
張貼留言