Open table in Design mode, highlight/select multiple columns , press right button ... choose set primary key option
Better solution is to create table and Primary key by script
BOL is the best resource for such kind of dobts
i am not sure this is what u r looking for........
CREATE
TABLE [dbo].Section(SectionID [int]
IDENTITY(1,1) NOT NULL, Name [nvarchar](50) NULL CONSTRAINT [Section_PK] PRIMARY KEY NONCLUSTERED(
[SectionID]
ASC)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY])
ON [PRIMARY]CREATE
TABLE [dbo].Rooms(RoomID [int]
NOT NULL,SectionID
int not null,Cost
int,MaxPersons
int CONSTRAINT [Rooms_PK] PRIMARY KEY NONCLUSTERED(
RoomID
Asc,[SectionID]
ASC)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY])
ON [PRIMARY]
Madhu
i am not sure what do u mean by EDIT database.... In database terms it is Alter.. yes u can Alter Database...
Madhu
can u post the error u gets... what u must do just look at BOL (Books Online ) for Create Table syntax... u should do it throgh script...
regarding the Q 2-- I am not good at VS... i am not able to simulate the situation... sorry
Madhu