Hi everyone,
I am new to SQL and I am trying to learn my way around it on my own time.
I am using SQL2008R2 and trying to create tables following the instructions on the 'Microsoft SQL Server 2008, Steb by Step' by Mike Hotek.
Following the examples, I am trying to execute the following query:
CREATE SCHEMA HumanResources AUTHORIZATION dbo
GO
CREATE TABLE Customers.Customer
(CustomerID INT IDENTITY(1,1),
CompanyName VARCHAR(50) NULL,
FirsName VARCHAR(50) NULL,
LastName VARCHAR(50) NULL,
ModifiedDate DATE NOT NULL)
GO
But, every time I try to execute this query I get the following error mesage:
Msg 2760, Level 16, State 1, Line 1
The specified schema name "Customers" either does not exist or you do not have permission to use it.
I have tried to use different names for the table, regardless the name I try to assign I still get teh same problem.
I have tried creating new database and create tables with different names under the 'test database' but I always get the same error when i try to use the Table_x.TestTable (table name DOT table name) notation.
I believe I have the right premisions as I am logged-in as Administrator on the system and my 'Administrator' account appears under Databases->Security->Logins.
Any help would be much appreciated.
Regads,
LZ