数据库|mysql教程mysql,记录数据库-mysql教程bitsCN.com微信投票赚钱网站源码,Vscode端口的cmd,ubuntu单硬盘,Tomcat页面加载过多,sql
数据库|mysql教程
mysql,记录
数据库-mysql教程
bitsCN.com
微信投票赚钱网站源码,Vscode端口的cmd,ubuntu单硬盘,Tomcat页面加载过多,sqlite3创建表变量名,jira爬虫,php 当前页面跳转,蟒蛇seo工作室,网站面包屑导航代码,淘宝店铺模板太长了lzw
一个mysql存储记录
pandion 源码,vscode 光标插件,ubuntu20.04登录界面,tomcat设计原理,sqlite内存模式 c,统计访问人数插件,最新的app前端框架,如何整合爬虫数据,php 小数保留两位小数,徐州seo谢辉,小米导航网站模板,网页重构教程,云课堂网页模板,免费登陆页面模板,企业文件档案管理系统源码,网址导航程序后台lzw
01BEGIN02#-------------------------tbsysinfo03prepare tempSql from "ALTER TABLE `tbsysinfo` ADD COLUMN `szClass` varchar(2) NULL DEFAULT '00' AFTER `nType`";04execute tempSql; 0506#-------------------------netCard07prepare tempSql from "CREATE TABLE `tbNetCfg` ( `nID` INT(10) NULL AUTO_INCREMENT, `szCapture` VARCHAR(100) NOT NULL DEFAULT '0', `szServiceName` VARCHAR(100) NOT NULL DEFAULT '0', `szServiceIP` VARCHAR(100) NOT NULL DEFAULT '0', PRIMARY KEY (`nID`))COLLATE='utf8_general_ci' ENGINE=InnoDB;";08execute tempSql;09SELECT szAdminIP into @szAdminIp FROM `tbsyscfg`;10Select szName into @card1 from tbnetcards where nType = 1 limit 1;11Select szName into @card2 from tbnetcards where nType = 2 limit 1;12if @card2 is NULL THEN13 set @card2 = @card1;14end if;15insert into tbNetCfg values(NULL,@card1,@card2,@szAdminIp);1617#-------------------------limitSpeed18prepare tmpSqlToRun from "ALTER TABLE `tblimitspeed` ADD COLUMN `nWeekDay` smallint(1) NOT NULL DEFAULT 1 AFTER `nTimeZDef`,ADD COLUMN `group` smallint(1) NULL DEFAULT 1 AFTER `nWeekDay`,ADD PRIMARY KEY (`nWeekDay`)";19execute tmpSqlToRun;20select nWeekDay,`group`,nBandWidth,nTimeZDef,nTime0,nTime1,nTime2,nTime3,nTime4,nTime5,nTime6,nTime7,nTime8,nTime9,nTime10,nTime11,nTime12,nTime13,nTime14,nTime15,nTime16,nTime17,nTime18,nTime19,nTime20,nTime21,nTime22,nTime2321into @nWeekDay,@groupp,@BandWidth,@nTimeZDef,@nTime0,@nTime1,@nTime2,@nTime3,@nTime4,@nTime5,@nTime6,@nTime7,@nTime8,@nTime9,@nTime10,@nTime11,@nTime12,@nTime13,@nTime14,@nTime15,@nTime16,@nTime17,@nTime18,@nTime19,@nTime20,@nTime21,@nTime22,@nTime2322from tblimitspeed;23insert into tblimitspeed values(@nTime0,@nTime1,@nTime2,@nTime3,@nTime4,@nTime5,@nTime6,@nTime7,@nTime8,@nTime9,@nTime10,@nTime11,@nTime12,@nTime13,@nTime14,@nTime15,@nTime16,@nTime17,@nTime18,@nTime19,@nTime20,@nTime21,@nTime22,@nTime23,@BandWidth,@nTimeZDef,2,@groupp); 24END
成人app源码,vscode退出终端命令,qq影音 ubuntu,怎么显示tomcat,解密sqlite数据库,论文前端框架和同学的一样,网络爬虫基于什么语言传播,php 货币格式,seo优化精简代码,实用网站源码下载,网页视频播放器代码模板,ecshop免费wap模板lzw
说明
数据库升级写的一个存储过程,记录一下,以前每次写存储过程都需要全网找资料,很烦。
执行修改表结构语句:
prepare tempSql from "ALTER TABLE tbsysinfo ADD COLUMN szClass varchar(2) NULL DEFAULT '00' AFTER nType"; execute tempSql;
结果赋值:
Select szName into @card1 from tbnetcards where nType = 1 limit 1; set @card2 = @card1; 未使用的一种 DECLARE cnt INT DEFAULT 0; select count(*) into cnt from test_tbl; select cnt;
IF语法:
if @card2 is NULL THEN set @card2 = @card1; end if;
最后limitSpeed 部分,20多个字段,没找到简单的多列赋值的方法,蠢办法一个个赋值,真是–!!
bitsCN.com