Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can a table have two primary keys?

Answers were Sorted based on User's Feedback



Can a table have two primary keys?..

Answer / karunakar reddy

No,In the entire table,there will be only one primary key.
A primary key is nothing but a collection of one or more
coloumns used to identify a row in a table.

Is This Answer Correct ?    110 Yes 28 No

Can a table have two primary keys?..

Answer / dev lamani

no a table can have only one primary key.
u can make one or column to have primary key
that is called a composite primary key


Dev
ddlamani@yahoo.com

Is This Answer Correct ?    61 Yes 5 No

Can a table have two primary keys?..

Answer / suresh somayajula

A table can have Only One Primary key. But a table can have
composite Primary key. that means we can create composite
primary key
upto 16 columns only.

suresh.
suresh_somayajula@hotmail.com

Is This Answer Correct ?    52 Yes 4 No

Can a table have two primary keys?..

Answer / sankar

yes any table has only one primary key.but the basic idea
of pk is ....primary key=NOTNULL+UNIQUE KEY.which we can
give any column to a table and act as primary key

Is This Answer Correct ?    60 Yes 28 No

Can a table have two primary keys?..

Answer / vaibhavi_dixit

A table can have only one primary key constraint but it can
consist one or multiple columns.If a primary key is made up
of more than one columns then it is know as composite
primary key.

VD

Is This Answer Correct ?    15 Yes 2 No

Can a table have two primary keys?..

Answer / sowmya

Hi
A table can have only one primary key.but a primary key can
have two column fields
Ex i have a employee table.and i have fields eno,ename,esal
i can declare primarykey(esal,ename)

let me know if i am wrong

Is This Answer Correct ?    20 Yes 12 No

Can a table have two primary keys?..

Answer / 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

Can a table have two primary keys?..

Answer / rahul khanke

primary key is only and only one in a table.
it may be in more column in table means
In one table --one primary key and more than one column on
the same table

Is This Answer Correct ?    9 Yes 4 No

Can a table have two primary keys?..

Answer / murugavel. u

ya..it's possible when, a table contains more than one
fields. we can able to set the primary for two or more..

thanks.,

Is This Answer Correct ?    5 Yes 2 No

Can a table have two primary keys?..

Answer / anish kumar anand

create table emp
(empno varchar2(10) constraint empnopk primary key,
e_id varchar2(10) constraint eiduk unique not null);

Is This Answer Correct ?    7 Yes 5 No

Post New Answer

More SQL PLSQL Interview Questions

I have 2 table A and B. In A 1 lakh record is present. In b 20 thousand data is present. To get the unique data from table A and B which join we should prefer left inner join or right outer join. Please answer.

4 Answers   GE,


When can we use the where clause and the having clause?

0 Answers  


What is dynamic query?

0 Answers  


How will you debug your procedure? If your procedure is around 2000 lines and the expected output is 10 and we get only output 5.So how will you debug it? Somebody pls give the correct answer?

2 Answers   Fidelity,


How long it takes to learn pl sql?

0 Answers  


Explain what is dbms?

0 Answers  


how can i read files from a pl/sq l program

3 Answers  


What is difference between stored procedures and application procedures?

0 Answers  


What trigger means?

0 Answers  


How many types of normalization are there?

0 Answers  


what is an extent ? : Sql dba

0 Answers  


How to Execute a Package in PL/SQL.?

0 Answers   MCN Solutions,


Categories