UPDATE EST_NF_ENT SET CD_USU=1 WHERE CD_USU=0

IF  NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_EST_NF_ENT_GLB_USU]'))
BEGIN

	ALTER TABLE [dbo].[EST_NF_ENT]  WITH CHECK ADD  CONSTRAINT [FK_EST_NF_ENT_GLB_USU] FOREIGN KEY([CD_USU])
	REFERENCES [dbo].[GLB_USU] ([CD_USU])

	ALTER TABLE [dbo].[EST_NF_ENT] CHECK CONSTRAINT [FK_EST_NF_ENT_GLB_USU]

END