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
Why is the cursor important?
What is set transaction?
What if we write return in procedure?
Is sql an operating system?
Can we insert data into materialized view?
is mysql query is case sensitive? : Sql dba
discuss about myisam key cache. : Sql dba
i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this
How do you exit in sql?
What is clause?
what are the type of locks ? : Sql dba
What is the difference between python and sql?
How do I run a sql query in pgadmin 4?
Explain two easy sql optimizations.
How much does sqlite cost?