イベントを使用したテーブルの作成
936 ワード
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