iT Tuition Note
2011/12/29
update/replace column content
//mySQL
UPDATE [table_name]
set [column_name]=REPLACE([column_name], '[before]', '[after]')
UPDATE s_his
set s_his_date=REPLACE(s_his_date, 'Dec 7, 2011', '2011-12-07')
date calculation
//mySQL
SELECT CURDATE( )
-------------------
CURDATE( )
2011-12-29
SELECT CURDATE( ) -1
-------------------
CURDATE( ) -1
20111228
SELECT now( )
-------------------
now( )
2011-12-29 10:29:31
SELECT now( )-1
-------------------
now( )-1
20111229104426.000000
較新的文章
較舊的文章
首頁
訂閱:
文章 (Atom)