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
How can triggers be used for the table auditing?
What are the types of variables use in pl sql?
what is the difference between myisam static and myisam dynamic? : Sql dba
Which are the different types of indexes in sql?
What is full form of rtm?
What is rtm stands for?
Is it important to partition hard disk?
Could you please provide oca (oracle 10g) dumps for my certification ?
Is merge a dml statement?
What is a schema? How is it useful in sql servers?
explain what is mysql? : Sql dba
List different type of expressions with the example.
What are different types of functions in sql?
What does rownum mean in sql?
What is a sql schema used for?