上一页 1 2 3 4 5 6 7 8 ··· 12 下一页
摘要: 1、面向过程 int a = 10;int b =5;int c = a+b; int r1 = 10;int r2 = 5;double c = r1*r1*3.14 - r2*r2*3.14 缺点:重用性差,扩展性差,可维护性差 2、面向对象(1)对象:万物皆对象,对象是类实例化出来的东西(2) 阅读全文
posted @ 2016-08-09 10:54 尤痴武 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 触发器:是一个特殊的存储过程;通过增删改的动作来触发执行,没有参数,没有返回值; create trigger Insert_Student --命名规范on student --针对于哪一个表for insert --针对于哪一个动作来触发 -- onclick = "show()" as 触发执 阅读全文
posted @ 2016-08-09 10:53 尤痴武 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 存储过程:就像函数一样的会保存在数据库中--》可编程性 --》 存储过程 创建存储过程:create proc JiaFa--需要的参数@a int,@b intas --存储过程的内容 declare @c int; set @c = @a + @b; return @c;go public in 阅读全文
posted @ 2016-08-09 10:52 尤痴武 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 31.select sname,ssex,sbirthday from studentunionselect tname,tsex,tbirthday from teacher 32.select sname,ssex,sbirthday from student where ssex='女'uni 阅读全文
posted @ 2016-08-09 10:51 尤痴武 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1.select Sname,Ssex,Class from student2.select distinct depart from teacher3.select * from student4.select * from score where degree between 60 and 80 阅读全文
posted @ 2016-08-09 10:50 尤痴武 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 高级查询 1.连接查询 select * from Info,Nation --形成笛卡尔积 select * from Info,Nation where Info.Nation = Nation.Code select Info.Code,Info.Name,Sex,Nation.Name,Bi 阅读全文
posted @ 2016-08-09 10:49 尤痴武 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 查询: 1.简单查询 select * from Info --查所有数据select Code,Name from Info --查指定列的数据select Code as '代号',Name as '姓名' from Info --给列指定别名 2.条件查询 select * from Info 阅读全文
posted @ 2016-08-09 10:48 尤痴武 阅读(120) 评论(0) 推荐(0) 编辑
摘要: identity 自增长 primary key 主键 unique 唯一键 not null 非空 references 外键(引用) 1.删除表 drop table Student 2.修改表 alter table RenYuan add CC int alter table RenYuan 阅读全文
posted @ 2016-07-31 10:47 尤痴武 阅读(203) 评论(0) 推荐(0) 编辑
摘要: T-SQL: 1.创建数据库:create database 数据库名称 2.使用数据库:use 数据库名称 3.创建数据表: create table RenYuan( code varchar(50) primary key, name varchar(50) unique, sex bit, 阅读全文
posted @ 2016-07-31 10:46 尤痴武 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 表的创建:1.创建列(字段):列名+类型2.设置主键列:能够唯一标识一条数据3.设置唯一:内容不能重复4.外键关系:一张表(从表)其中的某列引用自另外一张表(主表)中的主键列 设计表: 数据库的三大范式: 1.第一范式:(每一列的原子性)每一列在某个程序中是不可拆分的最小原子。 2.第二范式:(每一 阅读全文
posted @ 2016-07-31 10:45 尤痴武 阅读(121) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 12 下一页