Database Reference
In-Depth Information
/* Build custom.Application table */
print 'Custom.Application Table'
/* Check for existence of custom.Application table */
If Not Exists(Select s.name + '.' + t.name
From sys.tables t
Join sys.schemas s
On s.schema_id = t.schema_id
Where s.name = 'custom'
And t.name = 'Application')
begin
/* Create custom.Application table
if it does not exist */
print ' - Creating custom.Application Table'
Create Table custom.Application
(
ApplicationID int identity(1,1)
Constraint PK_custom_Application Primary Key
Clustered
,ApplicationName nvarchar(256) Not Null
Constraint U_custom_ApplicationName Unique
,ApplicationDescription nvarchar(512) Null
)
print ' - Custom.Application Table created'
end
Else
/* If the custom.Application table exists, tell us */
print ' - Custom.Application Table already exists.'
print ''
/* Build custom.Package table */
print 'Custom.Package Table'
/* Check for existence of custom.Package table */
If Not Exists(Select s.name + '.' + t.name
From sys.tables t
Join sys.schemas s
On s.schema_id = t.schema_id
Where s.name = 'custom'
Search WWH ::




Custom Search