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 are the differences between public, private, protected, static, transient, final and volatile? : Sql dba
What is pl sql package?
How many types of relationship are there?
Does pl sql work in mysql?
What is the starting oracle error number? What is meant by forward declaration in functions?
how to use regular expression in pattern match conditions? : Sql dba
What is PL/SQL Records?
how many ways we can we find the current date using mysql? : Sql dba
what is the use of friend function? : Sql dba
Explain select statements in sql?
what is the difference between a web-garden and a web-farm? : Sql dba
what is a cursor? : Sql dba
How do I access sql anywhere database?
What are the types of operators available in sql?
What do you mean by table in sql?