日期:2014-05-18 浏览次数:20559 次
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[Checking](
@tableName varchar(50),--表名
@SelName varchar(50)--条件
)
as
begin
declare @sql varchar(50)
set @sql='select count(*) from '+@tableName+' where username='''+@SelName+''''
print @sql
exec @sql
end
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[Checking](
@tableName varchar(50),--表名
@SelName varchar(50)--条件
)
as
begin
declare @sql varchar(50)
set @sql='select count(*) from '+@tableName+' where username='''+@SelName+''''
print @sql
exec @sql
end
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO