Can a table have two primary keys?
Answer Posted / satish reddy
Each table can have only one primary key; however, that key may consist of more than one column.
SQL> create table EMP(EMPNO Number(5),EMPNAME Varchar2(10),ADDRESS Varchar2(10),Constraint Multi_Constr
aint Primary Key(EMPNO,EMPNAME));
After creating table try to insert null value into EMPNAME Column, it will throw an error "cannot insert NULL into ("SCOTT"."EMP"."EMPNAME")"
Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What is difference between sql and oracle?
What are different types of functions in sql?
What is a sql*loader control file?
explain the difference between delete , truncate and drop commands? : Sql dba
What is the maximum number of rows in sql table?
Why coalesce is used in sql?
Does sqlite need a server?
what is the difference between delete and truncate commands? : Sql dba
What is rename in sql?
Which command is used to delete a trigger?
Is not null in sql?
How do I delete a trigger?
What are views in sql?
How you improve the performance of sql*loader? : aql loader
How does an execution block start and end in pl sql?