
IF (NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'beneficiario'))
BEGIN

CREATE TABLE [dbo].[beneficiario](
	[IDBENEFICIARIO] [bigint] IDENTITY(1,1) NOT NULL PRIMARY KEY,
	[idtitular] [bigint] NULL,
	[idparentesco] [bigint] NULL,
	[nome] [varchar](120) NULL,
	[CEP] [varchar](10) NULL,
	[ENDERECO] [varchar](60) NULL,
	[NUMERO] [varchar](5) NULL,
	[CIDADE] [varchar](30) NULL,
	[UF] [varchar](2) NULL,
	[BAIRRO] [varchar](60) NULL,
	[CGCCPF] [varchar](18) NULL,
	[RG] [varchar](13) NULL,
	[emissao] [date] NULL,
	[rguf] [varchar](2) NULL,
	[beneficio] [numeric](6, 2) NULL,
	[usuariocriacao] [bigint] NULL,
	[usuarioalteracao] [bigint] NULL,
	[datacriacao] [datetime] NULL,
	[dataalteracao] [datetime] NULL,
	[complemento] [varchar](30) NULL,
	[saida] [date] NULL,
	[obs] [varchar](max) NULL,
	[idprofissao] [bigint] NULL,
	[iditem] [bigint] NULL,
	[entrada] [date] NULL,
	[porcentagem] [numeric](6, 2) NULL,
	[dtnasc] [date] NULL);

END