is there more the two primary key in a single table?

Answers were Sorted based on User's Feedback



is there more the two primary key in a single table?..

Answer / narendra singh

yes, it may be possible that a table can have more than one
primary key but except its own primary key, others are
foreign keys...........

A primary key for one table is foreign key for other table..

thank Q......

Is This Answer Correct ?    0 Yes 0 No

is there more the two primary key in a single table?..

Answer / simi

yes,
CREATE TABLE [dbo].[custrate](
[id] [int] NOT NULL,
[patname] [char](50) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL,
[rate] [int] NULL,
CONSTRAINT [PK__custrate__12FE9D09] PRIMARY KEY CLUSTERED
(
[id] ASC,
[patname] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

Is This Answer Correct ?    0 Yes 1 No

is there more the two primary key in a single table?..

Answer / abhishek chakraborty

Yes

In Mysql

CREATE TABLE `rooms2hire`.`user data` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`email` VARCHAR( 255 ) NOT NULL ,
`name` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `id` , `email` )
) ENGINE = MYISAM

Is This Answer Correct ?    0 Yes 1 No

is there more the two primary key in a single table?..

Answer / murugavel

yes
CREATE TABLE "accessmenu" (
"UID" int(11) NOT NULL DEFAULT '0',
"MID" int(11) NOT NULL DEFAULT '0',
"AlterPermission" tinyint(4) DEFAULT '0',
PRIMARY KEY ("UID","MID")
);

Is This Answer Correct ?    4 Yes 6 No

is there more the two primary key in a single table?..

Answer / laxman2610

No, One table can have only one primary key. but, if u want
u can create another one as unique with not null.

Is This Answer Correct ?    0 Yes 2 No

is there more the two primary key in a single table?..

Answer / ganesaselvam

yes

Is This Answer Correct ?    24 Yes 28 No

Post New Answer

More SQL Server Interview Questions

What are the options which must be set to allow the usage of optimistic models?

0 Answers  


What authentication modes does sql server support?

0 Answers  


When would you use it?

0 Answers  


How to count duplicated values in a column in ms sql server?

0 Answers  


What is blocking?

0 Answers  






What is the process of normalization?

0 Answers  


How to find the date and time of last updated table?

3 Answers  


Is a null value equal to anything? Can a space in a column be considered a null value? Why or why not?

0 Answers  


can an order by clause be used in a creation of a view?

0 Answers  


What is the default Port No on which SQL Server listens?

0 Answers  


How to configure and test odbc dsn settings?

0 Answers  


Which command executes the contents of a specified file?

2 Answers   ABC, InfoMedia,


Categories