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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment