USE [OPMS_Online] GO /****** Object: Table [dbo].[OTB_FNC_AccountingBookStatus] Script Date: 2017/10/19 上午 11:50:10 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO Drop Table [dbo].[OTB_FNC_AccountingBookStatus] Go CREATE TABLE [dbo].[OTB_FNC_AccountingBookStatus]( [AccountingBookID] [Varchar](20) NOT NULL, [AccountingYear] [char](4) NOT NULL, [IsOpen] [char](1) NOT NULL, [CreateDate] [datetime] NOT NULL, [CreateUser] [varchar](50) NOT NULL, [ModifyDate] [datetime] NOT NULL, [ModifyUser] [varchar](50) NOT NULL, CONSTRAINT [PK_OTB_FNC_AccountingBookStatus] PRIMARY KEY CLUSTERED ( [AccountingBookID] ASC, [AccountingYear] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO Insert Into OTB_FNC_AccountingBookStatus(AccountingBookID, AccountingYear, IsOpen, CreateDate, CreateUser, ModifyDate, ModifyUser) Values ('Origtek', YEAR(Getdate()), 'Y', Getdate(), 'ApAdmin', Getdate(), 'ApAdmin') GO