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 the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba
What is the difference between inner join and left join?
What is the main reason behind using an index?
Why are indexes and views important to an organization?
how to install mysql? : Sql dba
what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?
how can we repair a mysql table? : Sql dba
how many ways to get the current time? : Sql dba
What is the sql*loader? : aql loader
Can we use view in stored procedure?
how to calculate the difference between two dates? : Sql dba
Can you select everything, but 1 or 2 fields, without writer's cramp?
What is sql in oracle?
what is error ora-03113: end-of-file on communication channel?
What is a relationship and what are they?