--在存储过程中创建表
CREATE PROCEDURE PR_CreateTable
@tableName varchar(50)
as
declare @TempSql varchar(2000)
if not exists (select * from dbo.sysobjects where id = object_id(N'['+@tableName+']') and objectproperty(id,N'IsUserTalbe') = 0)
begin
set @TempSql = 'create table '+ @tableName +' (
[PlayID] [int] identity (1,1) not null,
[UrlID] [int] not null,
[Url] [varchar] (1000) not null,
[ReplaceKeyword] [varchar] (500) null
) ON [primary]'
exec(@TempSql)
end
go
CREATE PROCEDURE PR_CreateTable
@tableName varchar(50)
as
declare @TempSql varchar(2000)
if not exists (select * from dbo.sysobjects where id = object_id(N'['+@tableName+']') and objectproperty(id,N'IsUserTalbe') = 0)
begin
set @TempSql = 'create table '+ @tableName +' (
[PlayID] [int] identity (1,1) not null,
[UrlID] [int] not null,
[Url] [varchar] (1000) not null,
[ReplaceKeyword] [varchar] (500) null
) ON [primary]'
exec(@TempSql)
end
go