how to add primary key to specific tablespace and hwo to create this view
287254Feb 4 2003 — edited Feb 4 2003All,
I have two questions want to get some imput from you all.
The first question is about adding primary key to a table to a specific tablespace. We have a table that get data from another table, because the table is huge (about 7 GB in size), so I didn't add primary key to the table until I inserted all the data. Now I want to ask that is there a way to create the primary key index to the specific tablespace? I know that I can always rebuild the index to another tablespace later on. Since the table is big, I wonder there maybe is a way to do it without rebuilding in order to save some time and space. What will be the statement or the steps to do it?
The second question is how to create a view to include all the data from two tables. we have two big tables in the database, those two tables have some columns in common and we actually can fuse those two tables into one if we do want billions of rows with a lot of null values in several columns. The first table t1 has columns a1, a2, a3, a4, a5, a6, a7, a8, the second table t2 has columns a1, a2, a3, a4, a5, a6, a7, a9, a10, a11. The columns with same name mean they are same. Of course not the data itself. Now instead of create a table to have all the data from those two tables, can we create a view to have all the data from those two tables? So the user can just query the view without having to differentiating that the data is in the first table or in the second table? How can I write the create view statement?
Thanks in advance.