记录、分享

mysql事件自动复制表

begin
    set @table_sql ='create table coordinate';
    #set @table_sql =  concat(@table_sql,DATE_FORMAT(NOW(), '%Y%m%d%H%i%s'));
    set @table_sql = concat(@table_sql,curdate()+1);
    #set @table_sql = concat(@table_sql,'daycounts');
    set @table_sql =  concat(@table_sql,"(
      select * from coordinate
    )");
     PREPARE stmt1 FROM @table_sql;
     EXECUTE stmt1;
    end;

posted on 2011-09-21 14:36 张生 阅读(402) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航:
 
<2011年9月>
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678

导航

统计

常用链接

留言簿

随笔档案

搜索

最新评论

阅读排行榜

评论排行榜