输入banner图图片脚本导航/分类

mysql常用操作

alter table test add column num int;

修改列

alter table test modify column num int;

删除列

alter table test drop column num;

添加索引

alter table test add index my_index(subkey);

删除索引

alter table test drop index my_index;

查看索引

show index from test;

查看表引擎

show create table test;

 创建过程

DROP PROCEDURE IF EXISTS proc1;
DELIMITER $$
CREATE PROCEDURE proc1(in max int)
BEGIN
DECLARE i int default 0;
while i<max do
insert into test(md5,subkey) values(uuid(),ceil(rand()*100000));
set i = i+1;
end while;
END;$$
DELIMITER ;

调用过程

call proc1;

mysql常用操作

标签:har   rem   prim   ima   innodb   call   post   int   查看