Hi All,
Can someone tell me what this means from my table schema script, AND type in (N'U'));
I understand the N means unicode but what about the 'u', thanks.
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[companies]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[companies](
[company_id] [int] IDENTITY(0,1) NOT NULL,
[companyname] [nvarchar](200) NULL,
[contactname] [nvarchar](200) NULL,
[contacttitle] [nvarchar](200) NULL,
[address] [nvarchar](200) NULL,
[city] [nvarchar](200) NULL,
[region] [nvarchar](200) NULL,
[postalcode] [nvarchar](200) NULL,
[country] [nvarchar](200) NULL,
[phone] [nvarchar](200) NULL,
[fax] [nvarchar](200) NULL,
[homepage] [nvarchar](200) NULL,
CONSTRAINT [PK_companies] PRIMARY KEY CLUSTERED
(
[company_id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
Can someone tell me what this means from my table schema script, AND type in (N'U'));
I understand the N means unicode but what about the 'u', thanks.
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[companies]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[companies](
[company_id] [int] IDENTITY(0,1) NOT NULL,
[companyname] [nvarchar](200) NULL,
[contactname] [nvarchar](200) NULL,
[contacttitle] [nvarchar](200) NULL,
[address] [nvarchar](200) NULL,
[city] [nvarchar](200) NULL,
[region] [nvarchar](200) NULL,
[postalcode] [nvarchar](200) NULL,
[country] [nvarchar](200) NULL,
[phone] [nvarchar](200) NULL,
[fax] [nvarchar](200) NULL,
[homepage] [nvarchar](200) NULL,
CONSTRAINT [PK_companies] PRIMARY KEY CLUSTERED
(
[company_id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END