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 fmtonly in sql?
What is an ndf file?
How can you save or place your msg in a table?
What is a common use of group by in sql?
Can we use rowid as primary key?
What is sql*plus?
How to test for null values?
How many types of triggers are there in pl sql?
What is varchar data type in sql?
Is sql open source?
i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5
What does a pl/sql package consist of?
What is sql data?
How to fetch values from testtable1 that are not in testtable2 without using not keyword?
Explain the difference between triggers and constraints?