关于sybase数据里动态sql语句赋值参数问题
declare @SqlStr varchar(8000)
declare @RecordCount int output
SELECT @SqlStr = 'declare @RecordCount int SELECT @RecordCount=Count(*) From Tb '+@dt+ ' select @RecordCount '
EXECUTE (@SqlStr)
SELECT @RecordCount
这样做是无效的.SQLSERVER 里面有sp_executesql 可以用,sybase里怎么用?
------解决方案--------------------execute (@SqlStr) sybase 12.5以上是支持的.