SQL: _ReadMe table..

1 post / 0 new
benzzon
benzzon's picture
SQL: _ReadMe table..
*** ReadMe table useful for keeping notes about database status, origin & more..
 
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[_ReadMe]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[_ReadMe]
GO
 
CREATE TABLE [dbo].[_ReadMe] (
 [RM_ID] [int] IDENTITY (1, 1) NOT NULL ,
 [RM_Text] [nvarchar] (2000) NULL ,
 [RM_EditUser] [nvarchar] (50) NULL ,
 [RM_EditDate] [datetime] NULL
) ON [PRIMARY]
GO
 
ALTER TABLE [dbo].[_ReadMe] WITH NOCHECK ADD
 CONSTRAINT [PK__ReadMe] PRIMARY KEY  CLUSTERED
 (
  [RM_ID]
 )  ON [PRIMARY]
GO
 
ALTER TABLE [dbo].[_ReadMe] ADD
 CONSTRAINT [DF__ReadMe_RM_EditUser] DEFAULT (suser_sname()) FOR [RM_EditUser],
 CONSTRAINT [DF__ReadMe_RME_InfoDate] DEFAULT (getdate()) FOR [RM_EditDate]
GO