是的
execute immediate sqlStr
但是你的ParastrSQL 拼接方式有问题
ParastrSQL := 'select count(*) as Total from [' + ParatblName + ']' +
' where ' + ParastrWhere;
改为
ParastrSQL := 'select count(*) as Total from ' ||ParatblName||'where'||ParastrWhere;
oracle中用||拼接字符串
正解,但要定义个变量来接收结果
execute immediate ParastrSQL into