LINQ是一种集成在计算机语言里的信息查询语句,是c#3.0中最惹人瞩目的功能。在C#中,LINQ语句有两种写法。第一种写法与SQL语句类似:IEnumerable result = from customer in customers where customer.FirstNa...
ADO.Net是.Net中用来访问数据库的技术,通过ADO.Net我们就能通过程序告诉数据库“请把年龄大于20岁的人员返回给我”。在学习ADO.Net之前一定要把常用的SQL语句掌握了看到这种写法相信所有人都要崩溃了,因为好像从来没学过where语句一样。因此必须在把常用的SQL语句掌握以后再来学A...
分类:
Web程序 时间:
2015-04-27 19:48:36
阅读次数:
139
关于备份恢复一直是所有关系型数据库的重头戏。下面会介绍冷备数据库,并模拟破坏数据文件进行恢复数据库,并涉及到其他相关内容。
[oracle@localhost ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
SQL> select * from v$version where ...
分类:
数据库 时间:
2015-04-27 18:30:35
阅读次数:
134
Please prove that you are the blog's owner by placing this code somewhere in a post:
TP:2AAB85C3
Place it somewhere where I can easily find it — you can remove the code in about 1-4 days....
分类:
其他好文 时间:
2015-04-27 16:54:00
阅读次数:
136
UPDATE product p, productPrice pp SET pp.price = pp.price * 0.8 WHERE p.productId = pp.productId
分类:
数据库 时间:
2015-04-27 16:46:31
阅读次数:
159
WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable参考了网上很多办法,不行。这个警告总觉得不...
分类:
移动开发 时间:
2015-04-27 15:10:04
阅读次数:
159
Query query = session.createQuery("select count(*)from Privilege p where p.name like ?");query.setString(0, "%" + name + "%");//注意这里不能写成setStri...
分类:
Web程序 时间:
2015-04-27 14:49:43
阅读次数:
461
语法:CREATE [索引类型] INDEX 索引名称ON 表名(列名)WITH FILLFACTOR = 填充因子值0~100GO/*实例*/USE 库名GOIF EXISTS(SELECT * FROM SYSINDEXES WHERE NAME='IX_TEST_TNAME')--检测是否已经...
分类:
数据库 时间:
2015-04-27 09:32:44
阅读次数:
201
select * from txt1select * from txt2select * from txt1 where name in (select name from txt2 where chk = 0)select * from txt1 where name not in (select...
分类:
数据库 时间:
2015-04-27 09:28:43
阅读次数:
313
1.对查询进行优化,要尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null最好不要给数...
分类:
数据库 时间:
2015-04-27 09:27:36
阅读次数:
212