Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> QUES: Create table Employee as........
I use this script to create a table:
create table employee as
select * from emp
If the Emp has these constraints on it:
C: Check constraint; includes Not Nulls P: Primary Key R: Foreign Key U: Unique V: With Check Option constraint (for views)
Which of these constraints will be on the new Employee table?
I ran this script on the emp table before I created the new table.
SQL> select constraint_name, constraint_type
2 from user_constraints
3 where table_name = 'EMP';
CONSTRAINT_NAME C ------------------------------ - S_EMP_MANAGER_ID_FK R S_EMP_DEPT_ID_FK R S_EMP_TITLE_FK R S_EMP_ID_NN C S_EMP_LAST_NAME_NN C S_EMP_ID_PK P S_EMP_USERID_UK U S_EMP_COMMISSION_PCT_CK C
8 rows selected. Received on Thu Nov 18 1999 - 10:55:58 CST
![]() |
![]() |