To create table for AUDIT function. Script with drop and create.
USE [Work] --DB Name
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Audit]') AND type in (N'U'))
DROP TABLE [dbo].[Audit]
USE [Work] --DB Name
GO
CREATE TABLE [dbo].[Audit](
[AuditId] [bigint] IDENTITY(1,1) NOT NULL,
[Status] [varchar](50) NOT NULL,
[StartTime] [datetime] NULL,
[EndTime] [datetime] NULL,
[VersionBuild] [int] NULL,
[UserName] [varchar](100) NULL,
[PackageName] [varchar](100) NULL,
[MachineName] [varchar](100) NULL
) ON [PRIMARY]
USE [Work] --DB Name
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Audit]') AND type in (N'U'))
DROP TABLE [dbo].[Audit]
USE [Work] --DB Name
GO
CREATE TABLE [dbo].[Audit](
[AuditId] [bigint] IDENTITY(1,1) NOT NULL,
[Status] [varchar](50) NOT NULL,
[StartTime] [datetime] NULL,
[EndTime] [datetime] NULL,
[VersionBuild] [int] NULL,
[UserName] [varchar](100) NULL,
[PackageName] [varchar](100) NULL,
[MachineName] [varchar](100) NULL
) ON [PRIMARY]
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.