2014-09-07

MySQL 字串數值欄位 大小排序 函數 CAST 用法

order by MODULE_NUM, CAST(IO_POINT AS DECIMAL(10,2))


order by CAST(a.PRDANO01 AS UNSIGNED INTEGER)


2017-04-05 CAST(欄位名稱  不需要單引號 不然會無效
select * from Z_DPROC_PARTS 
                 where TSN = '4' 
                   and TYPE = '1' 
                   and VIE = '1'
                 ORDER BY CAST(BOM14 AS UNSIGNED) ASC, SN 


沒有留言: