04 2016 档案
摘要:MySqlParameter[] a=new MySqlParameter[]{new MySqlParameter("@stu_id",stu_id)}; 参数使用
阅读全文
摘要:create procedure sting_a(in x int,in y int)begin set @x1=y*(x-1); set @x2=CONCAT('select * from t_student order by stu_id',' limit ', @x1,',',y); prep
阅读全文
摘要:create trigger ceshia1 after update on t_student for each ROWBEGINselect stu_id,stu_code,stu_name,stu_sex,age,stu_dept,NOW() into @v8,@v1,@v2,@v3,@v4,
阅读全文
摘要:create trigger ce after update on t_student for each rowBEGIN select stu_id,stu_name,NOW() into @v,@v2,@time from t_student where stu_id=old.stu_id; i
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; using MySql.Data.MySqlClient; using System.Data; namespace DBHelper { /// ///...
阅读全文
摘要:create procedure sp_sw2() begin declare error int default 0; declare continue handler for SQLEXCEPTION set error=1; START TRANSACTION; insert into t_student values('100','20169998','段天德1','男',...
阅读全文
摘要:假设A为1分钟B为2分钟C为5分钟D为10分钟 这个题 要把最慢的和最快的送过去 A和B过 A回来 3分钟 CD过 B回来 10+2=12分钟 AB过 2分钟 3+12+2=17分钟 第三和第四都不正确 而 第二个说了有些人偷了奶酪 如果正确的话 那表示 第一个人说对了 {5,4,3,2,1} 交换
阅读全文
摘要:create function aa(a int,b int,c int) returns int begin declare max int; set max=a; if max<b then set max=b; end if; if max<c then set max=c; end if;
阅读全文
摘要:drop procedure if exists teach.num_from_student; create procedure teach.student_a(in dept_name varchar(20),out count_num int) begin select count(*) into count_num from t_student where stu_dept=dept_n...
阅读全文
摘要:DROP PROCEDURE IF EXISTS teach.sp_Score_Level; CREATE PROCEDURE `sp`() BEGIN declare cur_stu_id int; declare cur_course_id int; declare cur_grade varchar(10); DECLARE done INT DEFAULT 0; d...
阅读全文
摘要:create PROCEDURE b2(in c_year int,in co int)begin declare num int; if exists(select * from class where class="c_year") then update class set code=code
阅读全文
摘要:private string Gen_code() { string rds = ""; using (MySqlConnection conn = new MySqlConnection("server = localhost;User Id=root;password=;database=tea
阅读全文
摘要:自本人拥有手机以来,由于有存短信的特殊嗜好,得出以下不完全统计: 累计中奖93次,资金共计2260万元(人民币),另有各种iphone68部, 电脑36台,轿车27辆,收到法院传票93张,被大学录取57次,儿子被拐卖13次。 请告诉我,我这一生是否是传奇!s
阅读全文
摘要:create PROCEDURE v4(in c_year int) BEGIN declare num int(10) default 0; declare num1 int(10); select code into num from class where class=c_year order by code desc limit 1; IF exists(sele...
阅读全文
摘要:create procedure agex(in addage1 int,in addage2 int)begindeclare curl_stu_id int; declare curl_stu_sex varchar(5);declare done int default 0;declare c
阅读全文