1 批量替换表里的指定内容
UPDATE `node` SET `title`= replace( `title`, '公交线路', '邯郸公交线路' ) WHERE `title` LIKE '%公交线路%'
2,更新一个字段为随机数 UPDATE vcms_item set click = FLOOR((RAND() * 10000))
3,从一个表复制数据到另一个表,子查询 insert into vcms_xmjs (`aid`,`body`,`type`) select `item_id`,`content`,`type` from tb_news where tb_news.type = 1
update 的子查询好像不能跟where *=* 这样的,只能跟指定值。
mysql时间戳 UNIX_TIMESTAMP( NOW( ) )