一些SQL命令

---批量异构数据导入
INSERT INTO Table1(`catid`, `status`, `inputtime`, `updatetime`)
SELECT `typeid`, 99, unix_timestamp(time), unix_timestamp(time)
FROM Table2
 
----批量数据替换
UPDATE `Table1` SET url=REPLACE(url,"/uacool/","/");
 
---字符串连接
UPDATE `Table1` SET `id`=CONCAT('c-1-',`id`)

 

posted @ 2012-04-16 19:55  Yunzhu  阅读(156)  评论(0编辑  收藏  举报