IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[STOCK]') AND type in (N'U')) BEGIN CREATE TABLE [dbo].[STOCK]( [STOCK_CODE] [varchar](10) NOT NULL, [STOCK_NAME] [varchar](50) NOT NULL ) END GO