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
Is record in oracle pl sql?
Why do we use procedures in sql?
What is the difference between stored procedure and view?
Is it possible to remove child records without removing master table records...the two having pk,fk relationship?
What is pl sql in oracle?
What does a pl/sql package consist of?
What is the difference between numeric and autonumber?
what is the difference between char and varchar data types? : Sql dba
Is clustered index a primary key?
State few characteristics of pl/sql?
How to run pl sql program in mysql?
What is the need of a partition key?
what is the difference between where clause and having clause? : Sql dba
Which is better stored procedure or query?
Explain autonomous transaction.