上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 30 下一页
摘要: 将另一张表中的查询结果插入到指定的表中例:INSERT test(username) SELECT username FROM users WHERE age>=20;其中test(id,username),users(id, username,age) 阅读全文
posted @ 2015-07-24 09:59 框框A 阅读(218) 评论(0) 推荐(0)
摘要: LIMIT {[offset,]row_count | row_count OFFSET offset}限制查询结果返回的数量例:SELECT * FROM users LIMIT 2;---出现头两条记录例:SELECT * FROM users LIMIT 3,2;---出现第4,5两条记录(从... 阅读全文
posted @ 2015-07-24 09:52 框框A 阅读(236) 评论(0) 推荐(0)
摘要: select sex from users group by sex having age>=35 说明:having 中的字段必须是select 查询字段之一。select sex from users group by sex having count(id)>=2;说明:如果 having后面... 阅读全文
posted @ 2015-07-24 09:35 框框A 阅读(157) 评论(0) 推荐(0)
摘要: 修改表名:ALTER TABLE table_name RENAME TO new_table_name;增加字段ALTER TABLE table_name ADD field_name filed_type;删除字段ALTER TABLE table_name DROP field_name;修... 阅读全文
posted @ 2015-07-21 09:11 框框A 阅读(184) 评论(0) 推荐(0)
摘要: 所有的HTML元素都属于block和inline之一。block元素的特点是:总是在新行上开始;高度,行高以及顶和底边距都可控制;宽度缺省是它的容器的100%,除非设定一个宽度, , , , 和 是块元素的例子。相反地,inline元素的特点是: 和其他元素都在一行上;高,行高及顶和底边距不可改变... 阅读全文
posted @ 2015-06-17 09:06 框框A 阅读(167) 评论(0) 推荐(0)
摘要: 总结了几点用于清除浮动的方法:1、对父级设置适合CSS高度一般设置高度需要能确定内容高度才能设置。2、clear:both清除浮动为了统一样式,我们新建一个样式选择器CSS命名为“.clear”,并且对应选择器样式为“clear:both”,然后我们在父级“”结束前加此div引入“class="cl... 阅读全文
posted @ 2015-06-09 10:53 框框A 阅读(386) 评论(0) 推荐(0)
摘要: select * from(select (row_number() OVER (ORDER BY stud_id)) as rownum,tab.* from score As tab) As t where rownum between 2 And 6 阅读全文
posted @ 2015-05-26 22:33 框框A 阅读(183) 评论(0) 推荐(0)
摘要: create trigger trig_transInfoon transInfofor insertas declare @type char(4),@outMoney Moneydeclare @myCardID char(10),@balanceMoneyselect @type=transT... 阅读全文
posted @ 2015-05-22 21:20 框框A 阅读(182) 评论(0) 推荐(0)
摘要: if exists(select * from sysobjects where name='view_stuInfo_stuMarks') drop view view_stuInfo_stuMarksgocreate view view_stuInfo_stuMarks as select 姓名... 阅读全文
posted @ 2015-05-22 16:33 框框A 阅读(175) 评论(0) 推荐(0)
摘要: 唯一索引:唯一索引不允许两行具有相同的索引值主键索引:为表定义一个主键将自动创建主键索引,主键索引是唯一索引的特殊类型。主索引要求主键中的每个值是唯一的,并且不能为空。聚集索引(Clustered):表中各行的物理顺序与键值的逻辑(索引)顺序相同,每个表只能有一个非聚集索引(Non-clustere... 阅读全文
posted @ 2015-05-22 16:28 框框A 阅读(623) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 30 下一页