请问一个各位大哥,看看我的这个存储过程有什么错误
create proc TableTerm
@TableName char(25),
@TableField char(20),
@TableTerm char(20),
@TableTerms char(20)
as
begin
declare @Tab char(100)
set @Tab=('select [email protected]+'from [email protected]+' where [email protected]+' = [email protected])
exec(@exec)
end
Go
------解决方案--------------------
- SQL code
declare @Tab char(100)set @Tab=('select [email protected]+' from [email protected]+' where [email protected]+' = [email protected])exec(@Tab)
------解决方案--------------------
1、from前面加空格
2、exec(@exec)改为exec(@Tab)
------解决方案--------------------
@exec没有声明
------解决方案--------------------
[email protected],这语句就是错的,因为没加引号