ALTER PROCEDURE [dbo].[sp_deletetable]
@tablename nvarchar(100),
@condition nvarchar(500)
AS
BEGIN
DECLARE @Sql nvarchar(800)
SET @Sql=‘delete from ‘[email protected]+‘ ‘[email protected]
--PRINT @Sql
EXEC(@Sql)
END
通用查询语句存储过程
ALTER PROCEDURE [dbo].[sp_getdatabyCondition]
@tablename nvarchar(50),
@conlumns nvarchar(200),
@condition nvarchar(200)
AS
BEGIN
DECLARE @sql nvarchar(1000)
SET @sql=‘select ‘+ @conlumns +‘ from ‘[email protected]+ ‘ ‘ [email protected]
EXEC(@sql)
END
时间: 2024-10-29 09:02:47