ITPub博客

首页 > Linux操作系统 > Linux操作系统 > using index

using index

原创 Linux操作系统 作者:dragondb 时间:2019-06-28 12:33:05 0 删除 编辑
创建primary or unique constraint时可以使用using index来对相应的index定义......

SQL> create table t1(c1 number primary key
2 using index tablespace users initrans 40 pctfree 10
3 storage(initial 10k next 50k));

Table created.

SQL> select segment_name, tablespace_name
2 from user_segments
3 where segment_name =
4 (select index_name from user_indexes where table_name = 'T1');

SEGMENT_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME
------------------------------
SYS_C003077
USERS


SQL> drop table t1;

Table dropped.

SQL> create table t1(c1 number primary key);

Table created.

SQL> select segment_name, tablespace_name
2 from user_segments
3 where segment_name =
4 (select index_name from user_indexes where table_name = 'T1');

SEGMENT_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME
------------------------------
SYS_C003078
TEST

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/45259/viewspace-134933/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Deferrable constraints
下一篇: Exception into table
请登录后发表评论 登录
全部评论

注册时间:2003-05-05

  • 博文量
    98
  • 访问量
    94093