mysql 更新数据
Posted 编程猴子
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql 更新数据相关的知识,希望对你有一定的参考价值。
1 drop PROCEDURE IF EXISTS AddIsDoliday ; 2 CREATE PROCEDURE AddIsDoliday() 3 BEGIN 4 IF NOT EXISTS (SELECT * FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = ‘t_fee_static‘ AND column_name = ‘IsDoliday‘) THEN 5 ALTER TABLE t_fee_static ADD IsDoliday int(4) DEFAULT 0 COMMENT ‘是否节假日(1:是;0否;)‘ AFTER ticketTimeType; 6 END IF; 7 IF NOT EXISTS (SELECT * FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = ‘t_fee_type‘ AND column_name = ‘IsDoliday‘ ) THEN 8 ALTER TABLE t_fee_type ADD IsDoliday int(4) DEFAULT 0 COMMENT ‘是否节假日(1:是;0否;)‘ AFTER IsDelete; 9 END IF; 10 11 end ; 12 call AddIsDoliday(); 13 drop PROCEDURE IF EXISTS AddIsDoliday;
以上是关于mysql 更新数据的主要内容,如果未能解决你的问题,请参考以下文章