[Solved] SQL Server 2012 Can’t create any table [closed]


Yes, the wrong part is AUTO_INCREMENT. there is no AUTO_INCREMENT in SQL Server. It should be IDENTITY.

Again, you are trying to create two IDENTITY field in your table. that’s not allowed. You can have only one IDENTITY field.

start and end are reserve word. You need to escape them using [] (square brackets)

You CREATE statement should look like

create table course (c_id int not null IDENTITY, r_id int not null , 
[start] date,
[end] date, 
name varchar(20), 
leader int, 
constraint pk_cousrse primary key (c_id, r_id, leader)
)

2

solved SQL Server 2012 Can’t create any table [closed]