使用事件创建表
2016-02-28 11:39
197 查看
begin set @table_sql ='create table cdn'; #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,"( id int not null auto_increment comment '自增长', domain varbinary(500) not null comment '域名', years int not null comment '年', months int not null comment '月', days int not null comment '天', bandwidth double not null comment '带宽', cdnip varbinary(30) not null comment 'cdn ip', primary key (id) )"); PREPARE stmt1 FROM @table_sql; EXECUTE stmt1; end
相关文章推荐
- 触发器的创建
- 使用注解做添加删除修改
- 对ibatis封装
- 2.11 Android Studio的常用快捷键
- 005_Http之request获取客户端信息08-编码之request编码-url编码
- The 11th Zhejiang Provincial Collegiate Programming Contest->Problem A:A - Pokemon Master
- java多线程编程总结
- 很久没有来更新了
- API Guides(五)——<Activity> To Dialogs
- mysql存储过程--返回两个时间的最大最小值
- 求两个时间段间的工作日(周一到周五)
- 软件测试基础
- 帮一个初学者朋友写的矩阵加法
- Ibatis N:1避免N+1查询的方法
- ibatis基础开发
- 禁用select,使select失去作用
- oracle添加列
- Eclipse下配置heritrix
- 文件夹拷贝
- MySQL的存储过程例子