查询分区:Select *From user_extents WHERE partition_name='分区名';1)创建表空间 create tablespace HRPM0datafile '/oradata/misdb/HRPM0.DBF' size 5m autoextend on ne....
分类:
数据库 时间:
2015-08-14 11:25:15
阅读次数:
293
映射文件详解2.映射文件2.1.exampleinsert into t_user(name,sex) values(#name#,#sex#)delete from t_user where id=#value#2.2.sqmlMap节点namespace命名空间,与useStatementNam...
分类:
其他好文 时间:
2015-08-14 09:52:00
阅读次数:
207
索引唯一扫描:是针对唯一性索引大扫描,它仅仅适用于where条件里是等值查询的目标SQL,因为扫描的对象是唯一性索引,只扫描索引高度这么多个索引块就停止了,索引的唯一扫描的结果至多只返回一条记录,索引的唯一扫描,扫描索引高度-2个分支块,永远只扫描一个叶子块。索引范围..
分类:
数据库 时间:
2015-08-14 08:51:17
阅读次数:
175
Oracle11g 会遇到这样的问题,用exp整库导出的时候,会遇到这样的问题,库里的空表没办法导出select * from all_all_tables aa where aa.owner='User名大写' ---查看用户下所有表select * from all_tables t where...
分类:
数据库 时间:
2015-08-14 00:55:56
阅读次数:
263
在实际的项目开发中很多时候都要进行模糊匹配,比如说匹配列值的某一部分。SQL提供了四种匹配方法:1、%匹配 %匹配又有几种不同的用法。%atm%,前后都可以通配,得到的结果可以是“atmmm”,“ggatm”,“bbatmaa”;
select * from tableinfo where name like "%atm%";如果需要匹配两个字符或者字符串,可以用and连接。select *...
分类:
数据库 时间:
2015-08-13 23:43:36
阅读次数:
258
php代码段: public?function?demo(){
????$sql?=?"select?count(0)?from?table?where?id="?.?$id;
????if(!$mysql->getResult($sql)){
????????echo?json_encode(array(‘code‘?=>?...
分类:
Web程序 时间:
2015-08-13 22:34:35
阅读次数:
157
简述SQL:结构化查询语言,是一门编程语言,是用于管理数据库的编程语言。元素:数据,数据类型,变量,函数,流程控制,运算符,注释。注释:行:
#
–[空格]块:
/* */select * from swpu_stu #where id=2;
;select * from swpu_stu -- where id=2;
;结束符:select * from swpu_stu where id=...
分类:
数据库 时间:
2015-08-13 22:16:46
阅读次数:
236
1063. Set Similarity (25)Given two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Ncis the number of distinct common ...
分类:
其他好文 时间:
2015-08-13 22:08:48
阅读次数:
104
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num...
分类:
数据库 时间:
2015-08-13 21:59:07
阅读次数:
143
explain analyze ,format,buffers,format :TEXT, XML, JSON, or YAML.EXPLAIN (ANALYZE,buffers,format yaml) SELECT first_name FROMcustomer_master WHERE fir...
分类:
数据库 时间:
2015-08-13 21:46:26
阅读次数:
169