简单查询: 一、投影 select * from 表名 select 列1,列2... from 表名 select distinct 列名 from 表名 二、筛选 select top 数字 列|* from 表名 (一)等值与不等值 select * from 表名 where 列名=值 se...
分类:
数据库 时间:
2015-03-02 20:55:38
阅读次数:
215
这是类型参数约束,.NET支持的类型参数约束有以下五种:where T : struct | T必须是一个结构类型where T : class | T必须是一个类(class)类...
分类:
其他好文 时间:
2015-03-02 20:34:40
阅读次数:
114
查询Oracle正在运行SQL的SQL命令:
select a.EVENT, a.SQL_ID, a.MACHINE, b.SQL_TEXT, b.SQL_FULLTEXT,b.FIRST_LOAD_TIME,b.LAST_LOAD_TIME,b.LAST_ACTIVE_TIME
from v$session a, v$sql b
where a.SQL_ID = b.SQL_ID...
分类:
数据库 时间:
2015-03-02 19:15:46
阅读次数:
189
说明:复制表(只复制结构,源表名:a 新表名:b) SQL: select * into b from a where 11 说明:拷贝表(拷贝数据,源表名:a 目标表名:b) SQL: insert into b(a, b, c) select d,e,f from b; 说...
分类:
数据库 时间:
2015-03-02 18:36:25
阅读次数:
228
查询语句 Sql sql = Sql.Builder; sql.Select("spb_MailAddress.*") .From("spb_MailAddress") .Where("spb_Mai...
分类:
其他好文 时间:
2015-03-02 18:23:18
阅读次数:
101
select Name,salesPersonID From Sales.store where name between 'g' and 'j' and salespersonID > 283 order by salespersonid,name desc/ASC本语句的between的用法还是...
分类:
数据库 时间:
2015-03-02 18:13:38
阅读次数:
164
db file async I/O submit 等待事件优化
一、数据发生db file async I/O submit
我们从数据库awr报告中经常会看到很高db file async I/O submit的等待事件:
SQL> select event,wait_class,wait_time from v$session_wait where wait_class...
分类:
数据库 时间:
2015-03-02 16:57:48
阅读次数:
260
1.覆盖索引:select和where中包含的结果集中应存在“非聚集索引列”,这样就不用查找基表了,索引表即可搞定;2.索引交叉:是针对覆盖索引的一种扩展来说的(这里的非聚集索引建在了l1和l2 ,select * from t_ where l1='asd' and l2='qwe'),则两个非聚...
分类:
数据库 时间:
2015-03-02 16:22:48
阅读次数:
164
Where‘sthenearbank?It‘sjustaroundthecorner.WhereisPeter?Whereisthedepartmentstore?Whereisthepostoffice?Whereisthenearestbank?Whereisthenearestpostoffice?Whereisthenearestdepartmentstore?It‘sjustaroundthecorner.Where‘stheschool,Please?Where‘sthepostoffice,Pl..
分类:
其他好文 时间:
2015-03-02 15:05:14
阅读次数:
163
今天遇到一个需求,直接没有接触过按照某个字段的第一个字的首字母排序,查了一下资料解决了,下面是sql语句,作为记录select `field` from `table` where 1 order by convert(field using gbk) collate gbk_chinese_ci ...
分类:
编程语言 时间:
2015-03-02 14:45:13
阅读次数:
225