我想将Teradata DML查询的输出捕获到存储过程中的变量中。例如:
delete from emp;
我希望删除的记录数量输入一个可用于记录目的的变量。
答案 0 :(得分:1)
您是否阅读过手册?
declare cnt int;
delete from emp;
set cnt = activity_count;
和标准SQL的GET DIAGNOSTIC
declare cnt int;
delete from emp;
get diagnostics cnt = row_count;