创建数据表: create table tt1( id int, name varchar(20), age int,sex boolean ); insert into tt1 values(1,"zhang",25,0); insert into tt1 values(2,"wang",25,1); insert into tt1(id,name,age,sex) values(3,"li",28,1); insert into tt1(id…
一.修改配置文件config-sharding.yaml,并重启服务 # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # T…
一 流程控制 delimiter // CREATE PROCEDURE proc_if () BEGIN declare i int default 0; if i = 1 THEN SELECT 1; ELSEIF i = 2 THEN SELECT 2; ELSE SELECT 7; END IF; END // delimiter ; if条件语句 二 循环语句 delimiter // CREATE PROCEDURE proc_while () BEGIN DECLARE num I…