USP_IDSET_DELETESTATICTABLE
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@TABLENAME | nvarchar(128) | IN |
Definition
Copy
create procedure dbo.USP_IDSET_DELETESTATICTABLE
@TABLENAME nvarchar(128)
with execute as owner
as
set nocount on
declare @TABLEID as integer
declare @SQL as nvarchar(300)
select @TABLEID = id from dbo.sysobjects where id = object_id(@TABLENAME) and OBJECTPROPERTY(id, 'IsUserTable') = 1
if @TABLEID > 0
-- drop existing table
exec ('DROP table [' + @TABLENAME + ']')
return 0