/****** Object:  Table [dbo].[RC_CLI_AUDIT]    Script Date: 06/11/2015 13:57:58 ******/
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RC_CLI_AUDIT]') AND type in (N'U'))
begin
CREATE TABLE [dbo].[RC_CLI_AUDIT](
	[CD_CTR] [int] IDENTITY(1,1) NOT NULL,
	[CD_EMP] [int] NOT NULL,
	[CD_FILIAL] [int] NOT NULL,
	[CD_CLI] [int] NOT NULL,
	[RZ_CLI] [varchar](150) NOT NULL,
	[NM_FANT] [varchar](150) NOT NULL,
	[DATA_NASC] [datetime] NULL,
	[DATAULTANIVERSARIO] [datetime] NULL,
	[DT_NASC] [datetime] NULL,
	[CD_REGI] [int] NOT NULL,
	[DT_CAD_AUDIT] [datetime] NOT NULL,
	[CD_USU] [int] NULL,
 CONSTRAINT [PK_RC_CLI_AUDIT] PRIMARY KEY CLUSTERED 
(
	[CD_CTR] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]


ALTER TABLE [dbo].[RC_CLI_AUDIT] ADD  CONSTRAINT [DF_RC_CLI_AUDIT_CD_EMP]  DEFAULT ((0)) FOR [CD_EMP]

ALTER TABLE [dbo].[RC_CLI_AUDIT] ADD  CONSTRAINT [DF_RC_CLI_AUDIT_CD_FILIAL]  DEFAULT ((0)) FOR [CD_FILIAL]

ALTER TABLE [dbo].[RC_CLI_AUDIT] ADD  CONSTRAINT [DF_RC_CLI_AUDIT_CD_CLI]  DEFAULT ((0)) FOR [CD_CLI]

ALTER TABLE [dbo].[RC_CLI_AUDIT] ADD  CONSTRAINT [DF_RC_CLI_AUDIT_RZ_CLI]  DEFAULT ('') FOR [RZ_CLI]

ALTER TABLE [dbo].[RC_CLI_AUDIT] ADD  CONSTRAINT [DF_RC_CLI_AUDIT_NM_FANT]  DEFAULT ('') FOR [NM_FANT]

ALTER TABLE [dbo].[RC_CLI_AUDIT] ADD  CONSTRAINT [DF_RC_CLI_AUDIT_CD_REGI]  DEFAULT ((0)) FOR [CD_REGI]

ALTER TABLE [dbo].[RC_CLI_AUDIT] ADD  CONSTRAINT [DF_RC_CLI_AUDIT_DT_CAD_AUDIT]  DEFAULT (getdate()) FOR [DT_CAD_AUDIT]
end


