width怎么读英语发音
MySQL存储过程(带输⼊参数)实例DROP TABLE
IF
EXISTS `CUSTOMERS`;
CREATE TABLE CUSTOMERS (
`id` INT ( 11 ) NOT NULL AUTO_INCREMENT,-- ID
`cust_num` INT ( 11 ),-- 客户编号
`company` VARCHAR ( 20 ),-- 公司名称
`cust_rep` INT ( 11 ),-- 雇员
`credit_limit` DECIMAL ( 16, 2 ),-- 信⽤限额
PRIMARY KEY ( `id` )
);
DROP TABLE
IF
EXISTS `SALESREPS`;
CREATE TABLE `SALESREPS` (
`id` INT ( 11 ) NOT NULL AUTO_INCREMENT,-- ID
`quota` DECIMAL ( 16, 2 ),-- 销售⽬标mysql查看所有存储过程
`empl_num` INT ( 11 ),
PRIMARY KEY ( `id` )
);
INSERT INTO `SALESREPS` ( ID, QUOTA, EMPL_NUM )
VALUES
( 1, 20000.00, 103 );
DROP TABLE
IF
EXISTS `OFFICES`;
CREATE TABLE `OFFICES` (
`id` INT ( 11 ) NOT NULL AUTO_INCREMENT,
`target` DECIMAL ( 16, 2 ),
`city` VARCHAR ( 20 ),
PRIMARY KEY ( `id` )
scanf函数赋值法
);
INSERT INTO `OFFICES` ( id, target, city )
特效短视频制作软件免费VALUES
( 1, 20000.00, '深圳' );
DROP PROCEDURE
IF
EXISTS `ADD_CUST`;
DELIMITER //
CREATE PROCEDURE `ADD_CUST` (
IN c_name VARCHAR ( 20 ),
IN c_num INTEGER,
IN cred_lim DECIMAL ( 16, 2 ),
IN tgt_sls DECIMAL ( 16, 2 ),
IN c_rep INTEGER,
IN c_offc VARCHAR ( 20 )
) BEGIN
INSERT INTO customers ( cust_num, company, cust_rep, credit_limit )
VALUES
( c_num, c_name, c_rep, cred_lim );
UPDATE salesreps
SET quota = quota + quota + tgt_sls
WHERE
empl_num = c_rep;
java接口练习
UPDATE offices
SET target = target + tgt_sls
WHERE
city = c_offc;
COMMIT;
简单网页设计模板html代码4页
END// CALL `ADD_CUST` ( '李四', 504, 200.00, 500.00, 309, '⼴州' );

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。