Mitchell Desmet Mitchell Desmet - 7 months ago 11
SQL Question

Can't create a table with SQL

When I execute my code I have this error:

Error

CREATE TABLE tblContactUs
(
contactUsID uniqueidentifier primary key default (newid()),
name varchar(30) not null,
newsletter VARCHAR(1) constraint check newsletter check(gender in ('Y','N')) default('N'),
dbo.UseLogin foreign key references dbo.UseLogin(userID)
}

Answer

Try changing the database from master to ProjectjeSQL