随笔分类 -  SQL2008学习笔记\

摘要:今天想复制一份SLQ2008下的数据库,需要把数据库暂停一下,但是打开资源管理器却打不打,提示无权限,因为SQL2008是VS2010附带安装的,以为程序有什么损坏,就重新安装了一下VS2010修复了一下,结果无效.又用一份单独的SQL2008安装程序修复,结果还是一样的问题,折腾一晚上,没解决问题... 阅读全文
posted @ 2011-11-17 21:38 programmer小卫 阅读(458) 评论(0) 推荐(0)
摘要:/*java 数组的操作 System类的arraycopy静态函数用于数组拷贝 数组是不能越界的 对象数组的复制实际上是复制的引用的拷贝 也就是对象的地址 */class Point{int x;int y;Point(int x,int y){this.x=x;this.y=y;}}class ... 阅读全文
posted @ 2011-07-27 17:34 programmer小卫 阅读(171) 评论(0) 推荐(0)
摘要:/*IF ELSE 语句 BEGIN END 相当予C语言中的{} 当语句块中只有一句的时候 可以省略 BEGIN ENDwhile begin...语句块 end PRINT 打印输出信息 */declare @num int select @num=100;WHILE @num>90BEGIN ... 阅读全文
posted @ 2011-07-25 23:38 programmer小卫 阅读(125) 评论(0) 推荐(0)
摘要:interface Animal{void eat();}class zoo{Animal GetAnimal(){return new Animal(){public void eat(){System.out.println("animal eat");}};}}class Test{publi... 阅读全文
posted @ 2011-07-24 01:30 programmer小卫 阅读(89) 评论(0) 推荐(0)
摘要:1.我们可以吧sql查询结果 保存成一个xml格式select * from table FOR XML RAW / AUTO 模式有2中 AUTO RAW 生成的xml格式不同 2. 差查询 EXCEPT select * from * EXCEPT select * from * 作用是吧第一... 阅读全文
posted @ 2011-07-20 21:51 programmer小卫 阅读(126) 评论(0) 推荐(0)
摘要:XML 可扩展标记语言 xml在 T_SQL语言中式一种数据类型 我们可以通过 query查询查询我们所要查询的节点 例子 xml查询 xml.query(' ')create table m_table(s_num int,s_data xml)INSERT INTO m_table value... 阅读全文
posted @ 2011-07-20 21:13 programmer小卫 阅读(134) 评论(0) 推荐(0)
摘要:1.子查询 select * from ... where ... in select .. from ...子查询 就是where后面接着 select 语句 例子:select * from 辅导员信息 A where A.辅导员编号 IN( select B.辅导员 from 班级信息 B)... 阅读全文
posted @ 2011-07-19 23:09 programmer小卫 阅读(103) 评论(0) 推荐(0)
摘要:1. 交叉连接返回的是笛卡尔积 什么是笛卡尔积呢? 笛卡尔积就是 比如 表1有 12 两行 表2有 ab 两行 那么 交叉连接后返回的是 1a 1b 2a 2b 这就是交叉连接 SELECT LIST FROM TABLE1 CROSS JOIN TABLE2 可以加where筛选 或者 order... 阅读全文
posted @ 2011-07-18 18:10 programmer小卫 阅读(153) 评论(0) 推荐(0)
摘要:1.T_SQL多表查询的中的基本连接 select table1.a,table2.b from table1,table2 where table1.c=table2.c ; /select/注意每列要加上表明from后面要加上表名字 where 后面接连接条件 多表查询中的内部链接 和基本连接... 阅读全文
posted @ 2011-07-17 21:35 programmer小卫 阅读(130) 评论(0) 推荐(0)