I ran the following script:
CREATE TABLE [dbo].[horario](
[Ano] [int] NOT NULL,
[CodigoTurma] [varchar](5) NOT NULL,
[Ordem] [int] NOT NULL,
[Professor_Id] [int] NOT NULL,
[Matriz_Semestre] [int] NOT NULL,
[Matriz_Curso_Codigo] [varchar](5) NOT NULL,
[Matriz_Disciplina_Codigo] [varchar](5) NOT NULL,
CONSTRAINT [primary key1] PRIMARY KEY CLUSTERED
(
[Ano] ASC,
[Professor_Id] ASC,
[Matriz_Semestre] ASC,
[Matriz_Curso_Codigo] ASC,
[Matriz_Disciplina_Codigo] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
I can not remove the created table, so to add a new column I ran the following command:
ALTER TABLE horario ADD Dia [int] NOT NULL
The problem is that I need this new column to also be part of the primary key
set. Can anyone help me?
For some reason the bank looked like this: