摘要:
把一个表分区成三个表 create procedure fun(in tableNum int) begin declare num int default 0; declare i int default 0; declare idn int; -- 逐条获取主表每条记录 --获取总条数,然后循环 阅读全文
摘要:
阅读全文
摘要:
if 条件 than elseif 条件 elseif 条件 elseif 条件 else end if; eg: create procedure showAge(in age int)beginif age < 16 then select "少年";elseif age<30 then sel 阅读全文
摘要:
create procedure 名称(in|out|inout 名称 类型,...) begin 过程体; end 说明: 过程体中可以使用我们学过的所有SQL 可以用变量,运算,流程控制器语句,函数, 存储过程没有返回值 声明变量 declare maxAge int; mysql中赋值声明变量 阅读全文
摘要:
创建分区之range分区 创建分区之list分区 使用条件: 创建分区之hash分区 create table blog( ... primary key(id,userid) ) partition by hash(userid) partitions 3 ; 3个分区 explain selec 阅读全文