SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE procedure [dbo].[p_sys_md_delete]

as
	
	update md_fields set fld_grid_name = null
	delete from md_grids_fields
	delete from md_grids

	delete from md_fields
	delete from md_tables
	
	print 'TO DO: Unlink/link database from source control before getting the updates'
GO
