摘要: --触发器:触发器就是一种特殊的存储过程--特殊的地方在于,触发器是通过对数据库表的操作,来引发--存储过程是通过人为exec来执行select *from studentcreate trigger Student_Insert --创建触发器on student --指定触发器所在的表afte... 阅读全文
posted @ 2015-04-29 12:40 zhenximeiyitian 阅读(163) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) { Console.WriteLine("请输入你的双色球号码:"+"\t"); //string s = Console.ReadLine(); ... 阅读全文
posted @ 2015-04-28 22:38 zhenximeiyitian 阅读(446) 评论(0) 推荐(0) 编辑
摘要: class Program { struct student { public string name; public int code; public int age; pu... 阅读全文
posted @ 2015-04-28 15:35 zhenximeiyitian 阅读(576) 评论(0) 推荐(0) 编辑
摘要: class Program { struct student //定义一个结构体 { public int code; public string name; public int fens... 阅读全文
posted @ 2015-04-28 15:25 zhenximeiyitian 阅读(1144) 评论(0) 推荐(0) 编辑
摘要: drop proc qiuhecreate proc qiuhe --用数据库语言做累加求和@n intas declare @sum int --相当于C#语言里定义变量 declare @i int set @sum=0 --再给变量赋值 ,相当于C#语言里的 int sum=0... 阅读全文
posted @ 2015-04-28 12:22 zhenximeiyitian 阅读(624) 评论(0) 推荐(0) 编辑
摘要: create view view_1 --建立一个新的视图名as --建立视图的函数select student.sno,sname,cno,DEGREE from student join score on student.sno=s... 阅读全文
posted @ 2015-04-27 21:57 zhenximeiyitian 阅读(776) 评论(0) 推荐(0) 编辑
摘要: select *from fruituse shuiguo --存储过程格式create proc 存储过程名--输入参数:当调用存储过程时,所需要输入的数据--输出参数:从存储过程中赋值后带出数据as --存储过程内容 return 返回值goexec 返回值=存储过程名 参数一,参数... 阅读全文
posted @ 2015-04-27 14:07 zhenximeiyitian 阅读(240) 评论(0) 推荐(0) 编辑
摘要: --存储过程--定义变量declare @bianliang intset @bianliang =12 --变量赋值select @bianliang print @biangliang --定义两个变量求和declare @bianliang1 int, @bianliang2 intset @... 阅读全文
posted @ 2015-04-26 16:32 zhenximeiyitian 阅读(274) 评论(0) 推荐(0) 编辑
摘要: use cangku create table cangkubiao(cno varchar(50) primary key not null,city varchar(50)not null,mianji int not null)insert into cangkubiao values('wh... 阅读全文
posted @ 2015-04-26 11:01 zhenximeiyitian 阅读(662) 评论(0) 推荐(0) 编辑
摘要: 1,distinct 对某一列进行去重检索有职工的工资大于或等于wh1仓库中任何一名职工工资的仓库号select distinct cno from zhigongbiao where gongzi >= (select Min(gongzi) from zhigongbiao where cno ... 阅读全文
posted @ 2015-04-26 10:59 zhenximeiyitian 阅读(231) 评论(0) 推荐(0) 编辑