上一页 1 ··· 4 5 6 7 8 9 下一页

2014年12月16日

摘要: 界面网页的界面html由两部分组成:和,放在中1、以下是部分的解释:……国际标准,可删除……网页标记,html之后的字可删除,网页的开始……头部:网页的编码方式,样式设定,头部标题标题……头部结束2、以下是部分: 网页的内容……网页的结尾又可以插入等多种元素操作路径:../../代表往上翻两个文件... 阅读全文
posted @ 2014-12-16 08:54 leaves0529 阅读(1099) 评论(1) 推荐(1) 编辑

2014年12月15日

摘要: 事务事务==流程控制 确保流程只能成功或者失败,若出现错误会自动回到原点例:begin traninsert into student values('111','王五','男','1999-09-09','95033')if @@ERROR>0goto tranrollback--直接到tranr... 阅读全文
posted @ 2014-12-15 16:25 leaves0529 阅读(217) 评论(0) 推荐(2) 编辑
 
摘要: 触发器(方便备份)本质上还是一个存储过程,只不过不是通过exec来调用执行,而是通过增删改数据库的操作来执行(可以操作视图)全部禁用触发器alter table teacher disable trigger all全部开启触发器alter table teacher enable trigger ... 阅读全文
posted @ 2014-12-15 16:23 leaves0529 阅读(1105) 评论(0) 推荐(2) 编辑
 
摘要: 视图即虚拟表系统-右键-新建视图编辑前200行select *from studentscore代码创建法:create view studentscoreasselect student.sno,sname,ssex,sbirthday,class,cno,degree from studentj... 阅读全文
posted @ 2014-12-15 16:17 leaves0529 阅读(198) 评论(0) 推荐(2) 编辑
 
摘要: 存储过程procedure(proc)数据库—可编程性—存储过程新建存储过程:create proc firstprocasselect *from fenshugo执行存储过程:存储过程—右键—执行存储过程declare @fanhuizhi intexec @fanhuizhi = firstp... 阅读全文
posted @ 2014-12-15 16:13 leaves0529 阅读(209) 评论(0) 推荐(2) 编辑
 
摘要: 流程控制begin ……end将一个语句块包含起来,中间可以写任何语句格式:begin--开始 select *from studentend--结束ifdeclare @bianliang intset @bianliang = 10if @bianliang>10 print '你好'else ... 阅读全文
posted @ 2014-12-15 16:04 leaves0529 阅读(668) 评论(0) 推荐(2) 编辑
 
摘要: 运算符+ - * / %(取余),赋值运算符 =declare @jia intset @jia = 1+1print @jiadeclare @jia intset @jia = 10%3print @jia比较运算符> ,=, (不等于),!=, ! ?逻辑运算符and, or, all(条件全... 阅读全文
posted @ 2014-12-15 16:01 leaves0529 阅读(479) 评论(0) 推荐(2) 编辑
 
摘要: 变量定义变量:declare @hello varchar(20)赋值:set @hello = ‘你好’select(结果框显示)/print(消息框显示) @hello*三行必须同时运行declare @hello varchar(20)set @hello = '销售部'select *fro... 阅读全文
posted @ 2014-12-15 15:59 leaves0529 阅读(171) 评论(0) 推荐(2) 编辑
 
摘要: 约束 除主键约束、外键约束外 唯一约束(主键列、索引列的候选索引) 设计---右键---索引/键---需要修改的列----是唯一的----忽略重复键 代码方式: cid varchar (20) unique 联合主键 所谓主键就是可以唯一确定该行数据,由此可以知道,当一个字段不能决定该行的值时,就 阅读全文
posted @ 2014-12-15 15:46 leaves0529 阅读(252) 评论(0) 推荐(2) 编辑
 
摘要: exists的用法 select *from haha where exists (select *from bumen where bumen.code = haha.bumen and bumen.name = '销售部' )and age>35 (运行方法为逐条查询) select name, 阅读全文
posted @ 2014-12-15 15:42 leaves0529 阅读(408) 评论(0) 推荐(2) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页