I need to drop a table if exist ?? how can i do that ??
thanx !if object_id('<table_name>') is not null drop table <table_name>|||Originally posted by ms_sql_dba
if object_id('<table_name>') is not null drop table <table_name>
thanx !!!!|||The M$ way...
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Company]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Company]
GO
Showing posts with label thanx. Show all posts
Showing posts with label thanx. Show all posts
Wednesday, March 21, 2012
Subscribe to:
Posts (Atom)