-
Can't create table from script
In SMS created a new database, just the New Database command. I have the attaced script to create a table but it fails with a Schema error. The problem is I can't see where I have to define the schema. I can create a table manually.
Error
Msg 2760, Level 16, State 1, Line 1
The specified schema name "HR" either does not exist or you do not have permission to use it.
Script
CREATE TABLE HR.Emp(
EmpID int NOT NULL,
FirstName nvarchar(50) NOT NULL,
LastName nvarchar(50) NOT NULL,
PhoneNumber nvarchar(25),
ManagerID int,
DeptID int NOT NULL,
Address nvarchar(60),
City nvarchar(30),
PostalCode nvarchar(15),
ProvinceCode nchar(3),
BirthDate datetime NULL,
HireDate datetime NULL,
VacationTime smallint NULL,
SickTime smallint NULL)
Many thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules