摘要: 1,使用下面的命令移动:alter table table_name move tablespace tablespace_name;2,如果有索引的话必须重建索引:alter index index_name rebuild tablespace tablespace_name;然,可以使用spool来帮助实现多个表的操作.set header off;spool /export/home/oracle/alter_tables.sql;select 'alter table ' || object_name || ' move tablespace users 阅读全文
posted @ 2011-07-22 14:35 jex 阅读(1396) 评论(0) 推荐(0) 编辑
摘要: 打开不重复记录的单个字段(重复的NAME被过滤,只出现一次)select distinct NAME from table打开不重复记录的所有字段值(有重复的NAME,且不是最小ID的记录被过滤,只出现最小ID的NAME)select * from table where ID in (Select min(ID ) FROM table group by NAME)查出NAME字段不重复出现的记录(有重复的NAME被过滤,多于1次的NAME不出现了)select * fromtablewhereNAME in (selectNAME from tablegroup by NAME havin 阅读全文
posted @ 2011-07-22 11:45 jex 阅读(962) 评论(0) 推荐(0) 编辑