Friday, August 02, 2013

T-SQL IF Exists Table Drop and Add - SQL Server

IF EXISTS(SELECT * FROM dbo.sysobjects WHERE ID = OBJECT_ID('[dbo].[tbl_staging_services_to_summary]'))
 BEGIN
  --PRINT 'tbl_staging_services'
  DROP TABLE [dbo].[tbl_staging_services_to_summary]
  PRINT 'Table Dropped and Recreated'
 END
ELSE
 BEGIN
 PRINT 'No Table Existed - Created Completed'
 END

No comments:

Building APIs with ASP.NET Core

Building APIs with ASP.NET Core Introduction to ASP.NET Core for API Development ASP.NET Core is a cross-platform, high-performance ...