oracle 数据库
文章平均质量分 60
jxs_king
这个作者很懒,什么都没留下…
展开
-
oracle 查询语句where 后 and or 判断的灵活运用
select t.creator 建单人,t.titles 工单主题,t.statusdisplay 工单状态,t.serialnumber 流水号 from up_itsm_iss t join v_depart_info rt on t.creatorid=rt.USERIDwhere (('小计'='{3}' and t.iss_class like '%{4}%' ) or (rt.CNA...原创 2011-08-18 15:29:15 · 1226 阅读 · 0 评论 -
ORACLE创建表空间、创建用户、更改用户默认表空间以及授权、查看权限
Oracle创建用户、表空间、导入导出、...命令 //创建临时表空间create temporary tablespace ext_temptempfile 'D:\oracle\product\10.2.0\oradata\test\ext_temp.dbf' size 32m autoextend on next 32m maxsize 2048mextent managemen...原创 2011-09-08 09:34:31 · 721 阅读 · 0 评论 -
设置非主键为聚集索引
----设置非主键为聚集索引【4步】1. 查看所有的索引,默认情况下主键上都会建立聚集索引sp_helpindex person2. --删除主键约束,把【1】中查询出的主键上的索引约束【如:PK__person__117F9D94】去除掉。去掉主键字段上面的主键约束,此时该字段不是主键了。alter table person drop constraint PK__person__117...原创 2011-09-09 11:22:34 · 502 阅读 · 0 评论 -
如何在oracle中查询所有用户表的表名、主键名称、索引、外键等+
1、查找表的所有索引(包括索引名,类型,构成列): select t.*,i.index_type from user_ind_columns t,user_indexes i where t.index_name = i.index_name and t.table_name = i.table_name and t.table_name = 要查询的表 2、查找表的主键(包括名称...原创 2011-09-16 14:04:55 · 140 阅读 · 0 评论 -
oracle远程导出数据库
根据用户导出exp username/userpass@192.168.0.1:1251/orcl file=xxx.dmp log=xxx.logowner=xxx导出所有exp username/userpass@192.168.0.1:1251/orcl file=xxx.dmp log=xxx.log full=y2011-02-18 12:46:35 · 120 阅读 · 0 评论 -
多库SQL union 查询
select protype 类型,sum(procount) 数量 from(select trim('未解决数量') protype,count(distinct t1.c1) procount from {4} t1where t1.c809000021<>'已关闭'and t1.c700000006>{1}and t1.c700000006<{2}and t1.c8...原创 2011-07-22 10:35:37 · 331 阅读 · 0 评论 -
如何维护索引
一. 查看系统表中的用户索引 在Oracle中,SYSTEM表是安装数据库时自动建立的,它包含数据库的全部数据字典,存储过程、包、函数和触发器的定义以及系统回滚段。 一般来说,应该尽量避免在SYSTEM表中存储非SYSTEM用户的对象。因为这样会带来数据库维护和管理的很多问题。一旦SYSTEM表损坏了,只能重新生成数据库。我们可以用下面的语句来检查在SYSTEM表内有没有其他用户的索引存在...原创 2011-11-02 08:42:19 · 397 阅读 · 0 评论