In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
SQL > create table t_hash_partition_parent (an int primary key,b int)
2 partition by hash (a)
3 partitions 2
four
SQL > / Table created.--- error reason: there should be a number after an int.
SQL > create table t_reference_partition (id int primary key,an int constraint fk_a
Foreign key (a), references t_hash_partition_parent (a))
2 partition by reference (fk_a)
3 /
Create table t_reference_partition (id int primary key,an int constraint fk_a fore
Ign key (a), references t_hash_partition_parent (a))
*
ERROR at line 1:
ORA-02253: constraint specification not allowed here--- error reason: foreign key column must be not null
SQL > ed
Wrote file afiedt.buf 1 create table t_reference_partition (id int primary key,an int constraint fk_a
Foreign key (a), references t_hash_partition_parent (a))
2 * partition by reference (fk_a)
SQL > create table t_reference_partition (id int primary key,an int,constraint fk_a
Foreign key (a) references t_hash_partition_parent (a))
2 partition by reference (fk_a)
3 /
Partition by reference (fk_a)
*
ERROR at line 2:
ORA-14652: reference partitioning foreign key is not supported
SQL > ed
SQL > create table t_reference_partition (id int primary key,an int not null,constr
Aint fk_a foreign key (a) references t_hash_partition_parent (a))
2 partition by reference (fk_a)
3 / number of partitions in the Table created.- subtable
SQL > select partition_name from user_tab_partitions where table_name='T_HASH_PAR
TITION_PARENT';PARTITION_NAME
SYS_P43
SYS_P44
-refers to the partition table of the partition. Conclusion: the partition table that references the partition depends on the number of partitions of the parent partition table.
SQL > select partition_name from user_tab_partitions where table_name='T_REFERENC
Estranged partner name
SYS_P45
SYS_P46
-constraint instructions for referencing partitions:-referencing partitions must refer to foreign key constraints, and the parent key of the primary partition table must build contention or unique constraint and meet the enable validate not deferenable.
You must specify a referential integrity constraint defined on the table being created, which must refer to a primary key or unique constraint on the parent table.
The constraint must be in ENABLE VALIDATE NOT DEFERRABLE state, which is the default when you specify a referential integrity constraint during table creation.
-all referenced foreign keys must be defined as not null
All foreign key columns referenced in constraint must be NOT NULL.
-if you specify a constraint, you can no longer specify on delete set null;, that is, when manipulating the parent table, you cannot set the record of the matching child table to be empty at the same time.
When you specify the constraint, you cannot specify the ON DELETE SET NULL clause of the references_clause.
-the referenced parent table must be a partitioned table; and the parent table partition method cannot be interval mode
The parent table referenced in the constraint must be an existing partitioned table. It can be partitioned by any method except interval partitioning.
Foreign keys and parent keys referenced by reference partitions and parent partition tables must never contain virtual columns based on pl sql function or lob columns
The foreign and parent keys cannot contain any virtual columns that reference PL/SQL functions or LOB columns.
-refer to the operation limits of the partition:
-the reference partition constraint depends on the partition policy of the parent partition table, that is, the partition type to which the parent partition belongs
Restrictions for reference partitioning are derived from the partitioning strategy of the parent table.
-iot, external tables, domain index storage tables cannot use reference partitioning
You cannot specify this clause for an index-organized table, an external table, ora domain index storage table.
The parent partition table can also be a reference partition, but the constraint cannot be self-contained
The parent table can be partitioned by reference, but constraint cannot be self-referential. The table being created cannot be partitioned based on a reference to itself.
-if row movement is enabled in the parent partition table, the reference partition must also start row movement.
If ROW MOVEMENT is enabled for the parent table, it must also be enabled for the child table.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.