I know the syntax to create constraint,index with the initial table creation script with tablespace storage info. I also know how to alter table add constraint primary key with tablespace storage info. I can also alter table add constraint foreign key without specifying the tablespace.But I could not get right for the alter table add constraint foreign key with tablespace storage info. I would appreciate if someone can help me with the correct syntax and give me a working example. Thanks.
The following is the foreign key I want to add. The snytax is correct, but I can not add tablespace storage into to it.
ALTER TABLE "HUBADMIN"."STEALTH_NATIVEMSG"
ADD CONSTRAINT "STEALTH_NATIVEMSG_FK" FOREIGN KEY( "DB20_ATOMICID", "DB20_HOPSTATUS")
Oracle does not automatically create indexes on foreign keys. It looks to me like this is what you are looking for. If yes, then create manually your indexes on that foreign key, and there you can state any storage option you need.
Ovidius, that is what I am trying to do. It won't let me specify the tablespace it should go to. I just want to know if it is doable and how. Please show me an example if you do know the answer. Thanks.
I tried that, it did not work unless you show me one working example. Thanks.
I tried many times, could not get it. I think srlhome00 is right that
Oracle does not create storage space for foreign key so there is no need and no way to specify the tablespace information.
Let me elaborate it. Foreign key is used to check the referencial integrity. It is to confirm the data you entered is indeed match the rule with the parent tables. So, Oracle does not create any index for foreign key specified. That is, no storage created for foreign key generation.