
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[EST_EXPOSICAO](
	[CD_EMP] [int] NOT NULL,
	[CD_EXPOSICAO] [int] NOT NULL,
	[CD_FILIAL] [int] NOT NULL,
	[DS_EXPOSICAO] [varchar](150) NOT NULL,
	[TP_USO] [int] NOT NULL,
	[DT_VENCTO] [datetime]   NULL, 
	[STS_EXPOSICAO] [int] NOT  NULL, 
	[CD_USU] [int] NOT NULL,
	[DT_CAD] [datetime] NULL, 
 CONSTRAINT [PK_EST_EXPOSICAO] PRIMARY KEY CLUSTERED 
(
	[CD_EMP] ASC,
	[CD_EXPOSICAO] 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

ALTER TABLE [dbo].[EST_EXPOSICAO] ADD  CONSTRAINT [DF_EST_EXPOSICAO_CD_EMP]  DEFAULT ((0)) FOR [CD_EMP]
GO

ALTER TABLE [dbo].[EST_EXPOSICAO] ADD  CONSTRAINT [DF_EST_EXPOSICAO_CD_EXPOSICAO]  DEFAULT ((0)) FOR [CD_EXPOSICAO]
GO

ALTER TABLE [dbo].[EST_EXPOSICAO] ADD  CONSTRAINT [DF_EST_EXPOSICAO_CD_FILIAL]  DEFAULT ((0)) FOR [CD_FILIAL]
GO

ALTER TABLE [dbo].[EST_EXPOSICAO] ADD  CONSTRAINT [DF_EST_EXPOSICAO_DS_EXPOSICAO]  DEFAULT ('') FOR [DS_EXPOSICAO]
GO
 
ALTER TABLE [dbo].[EST_EXPOSICAO] ADD  CONSTRAINT [DF_EST_EXPOSICAO_TP_USO]  DEFAULT ((0)) FOR [TP_USO]
GO
 
ALTER TABLE [dbo].[EST_EXPOSICAO] ADD  CONSTRAINT [DF_EST_EXPOSICAO_STS_EXPOSICAO]  DEFAULT ((0)) FOR [STS_EXPOSICAO]
GO
 
ALTER TABLE [dbo].[EST_EXPOSICAO] ADD  CONSTRAINT [DF_EST_EXPOSICAO_CD_USU]  DEFAULT ((0)) FOR [CD_USU]
GO
 


