如,string sql="select top @count from tabA order by id";
这样在程序运行时会提示“'@count'无效”,解决办法是:把sql改成"select top (@count) from tabA order by id"
如,string sql="select top @count from tabA order by id";
这样在程序运行时会提示“'@count'无效”,解决办法是:把sql改成"select top (@count) from tabA order by id"