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

No, A table having only one primary key.
If you declare as Primary
key(<column_name>,<column_name>,<column_name>) for any
table. This type key is called as composite key.

Is This Answer Correct ?    0 Yes 0 No

Can a table have two primary keys?..

Answer / hari

no. a table can have only one primary key.some times table
can use composite primary key

ex create table std
(stdid bigint(10) not null,
e mailid varchar(20) not null);
primary key(stdid,e mailid)

Is This Answer Correct ?    0 Yes 0 No

Can a table have two primary keys?..

Answer / chandu

We can create only one Primary kay in a table but it can
have multiple columns, of them we only choose 1 column as
identifiable column called primary key and the other columns
are called candidate key(s).

Is This Answer Correct ?    0 Yes 0 No

Can a table have two primary keys?..

Answer / abdul kuddus

Yes, A table can have maximum 16primary key columns in a table

Is This Answer Correct ?    0 Yes 0 No

Can a table have two primary keys?..

Answer / venkatesh

No,why because in one table in one primary key.so can use two primary key in a table that type of key is composite primary key.

Is This Answer Correct ?    0 Yes 0 No

Can a table have two primary keys?..

Answer / sruthi

yes table can contain one or more than one primary keys
but only one is considered as a primary key .

Is This Answer Correct ?    3 Yes 4 No

Can a table have two primary keys?..

Answer / anup ghosh

hi gyes please removw who have writen wrong ans. One table
can have only one primary key other wise it is not a good
database design.also my knowledge says that only one tabl;e
can have only one promary key........

Is This Answer Correct ?    1 Yes 2 No

Can a table have two primary keys?..

Answer / biju

Perfect answer Mr. Satish Reddy. Appreciated

Is This Answer Correct ?    1 Yes 2 No

Can a table have two primary keys?..

Answer / subbu

Well the question is

Can a table have two primary keys?

Practically Yes.

But theoritically there will be only 1 primary key with
multiple foriegn keys which acts as a composite keys for the
original primary key. How ever in the create or alter
statements, we need to write primary key only once following
the column names either single or multiple.

By seeing the posts, I believe some of the guys has got
confused with the question & compared it with the SQL create
statements where in Primary Key is written only once & by
which concluding that a table cannot have multiple primary keys.

Is This Answer Correct ?    1 Yes 2 No

Can a table have two primary keys?..

Answer / kumar navdeep shanker

Ya, it is possible..
try with this Query..
create table cust11
(
cno int not null,
balance int not null,
cname varchar(10),
CONSTRAINT cust primary key (
cno,balance)
)

If there is any Problem.. plz reply

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SQL PLSQL Interview Questions

What are the types of queries in sql?

0 Answers  


What is the difference between view and stored procedure?

0 Answers  


What are Nested Tables? How will u delete 5 rows from Nested Tables

3 Answers   IBM,


What is pragma in pl sql?

0 Answers  


What is the difference between count 1 and count (*) in a sql query?

0 Answers  


Can we use commit or rollback in trigger? If yes, then how. Please explain with a suitable example?

5 Answers   HSBC,


Is it possible to create the following trigger: before or after update trigger for each row?

0 Answers  


what is a scheduled jobs or what is a scheduled tasks? : Sql dba

0 Answers  


How to run pl sql program in mysql?

0 Answers  


What are the Restrictions on Cursor Variables?

2 Answers  


wa procedure to return the month and the no'f developers joined in each month.

4 Answers   Fidelity,


if we give update table_name set column_name= default. what will happen?

4 Answers   iFlex,


Categories