creating tables from script in dotnetnuke modules or
others -
if not exists (select * from dbo.sysobjects where
id = object_id(N'{databaseOwner}[{objectQualifier}
MessageEncryption]') and OBJECTPROPERTY
(id, N'IsTable') = 1)
BEGIN
CREATE TABLE {databaseOwner}[{objectQualifier}
MessageEncryption]
(
[MessageId] [int] IDENTITY(1,1) NOT NULL,
[Message] [nvarchar](max) NOT NULL,
[ToAddress] [nvarchar](500) NOT NULL,
[CcAddress] [nvarchar](500) NULL,
[Subject] [nvarchar](500) NULL,
[PassCode] [nvarchar](500) NULL,
[SentDate] [datetime] NOT NULL,
CONSTRAINT [PK_data_MessageEncryption] PRIMARY KEY
CLUSTERED ([MessageId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE =
OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]
END GO