Can a table have two primary keys?
Answers were Sorted based on User's Feedback
Answer / anand
Yes table can have two or more primary key,when we want to
create more then one primary we use unique constranit with
not null or we can create with triggre.
Is This Answer Correct ? | 1 Yes | 6 No |
Yes table can have two or more primary key.
Is This Answer Correct ? | 1 Yes | 9 No |
Answer / ashwin kumar
yes, a table may have more than 1 primary keys but, of them
we only choose 1 column as identifiable column called
primary key. The other columns are called surrogate keys or
candidate key.
Is This Answer Correct ? | 25 Yes | 43 No |
Answer / jamalvalli
Yes we can use. for Example
create table emp(empno number(5), ename varchar2(20),
deptno number(5) add primary key Pk_constraint( empno,
deptno))
Is This Answer Correct ? | 18 Yes | 38 No |
What is the process of debugging?
Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me
What is the difference between left join and right join?
What are the ddl commands?
What are types of indexes in sql?
how to create table with in the procedure or function?
What is raw datatype in sql?
What is sql injection owasp?
My select statement is not working as expected, So, to overcome from such issues what are the steps needed to be taken care?
What are operators available in sql?
trans_id trans_date trans_amt debit_credit_indicator 001 01-JAN-13 1099 cr 001 12-JAN-13 500 db 002 24-FEB-13 400 db 002 23-MAR-13 345 cr 001 18-APR-13 800 cr 002 15-MAR-13 600 db 001 12-FEB-13 200 cr i want like this output trans_id trans_date trans_amt debit_credit_indicator 001 JAN 1599 cr no.of trans 2 i want trans_id and trans_date like 'JAN' or 'FEB' etc, trans_amt i want all credit amount - debit amount per each trans_id. and debit_credit_indicator and no.of transactions in a month.
What is rank function in sql?