数据库
码农阿民
这个作者很懒,什么都没留下…
展开
-
oracle 关联表更新操作
update mds_jg_info aset video='是'where exists(select * from mds_jg_video b where a.pkid=b.dwid)原创 2011-10-18 14:24:03 · 126 阅读 · 0 评论 -
分段查询统计
select sum(case when ( 字段名>0 and 字段名<4000) then 1 else 0 end) 别名,sum(case when 字段名>=4000 and 字段名<8000 then 1 else 0 end) 别名,sum(case when 字段名>=8000 then 1 else 0 end) 别名 ,...原创 2011-10-25 17:27:58 · 215 阅读 · 0 评论 -
oracle 索引建立
适当的使用索引可以提高数据检索速度,可以给经常需要进行查询的字段创建索引 oracle的索引分为5种:唯一索引,组合索引,反向键索引,位图索引,基于函数的索引 创建索引的标准语法: CREATE INDEX 索引名 ON 表名 (列名) TABLESPACE 表空间名; 创建唯一索引: CREATE unique INDEX 索引名 ON 表名 (列名) TABLESPACE ...原创 2011-11-07 16:58:00 · 184 阅读 · 0 评论 -
oralce函数
select sqrt(64) from dual; 64开方的数----------------------------------------select power(8,2) from dual;8是数,2是乘的次数,就是8*8;原创 2011-11-08 10:17:52 · 92 阅读 · 0 评论