The first two are missing a comma,Try create table booking( booking_id int not null, booking_date date not null, booking_time varchar(5) not null, employee_id int not null, location_lid varchar(2) not null, constraint booking_booking_id_pk primary key (booking_id) , constraint booking_employee_id_fk foreign key (employee_id) references employees(employee_id) );
etc.Your thirs one works fine for mecreate table registration(registration_id int not null,registration_date date not null,registration_time varchar(5) not null,location_lid varchar(2) not null,constraint registration_registration_id_pk primary key (registration_id));
What version of SQL Server are you on. Is working ok on 2008Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION