Teradata:如何在存储过程中引发错误 [英] Teradata: How can I raise an error in a stored procedures

查看:109
本文介绍了Teradata:如何在存储过程中引发错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Teradata存储过程中引发错误?

Is there a way to raise errors inside of Teradata stored procedures?

例如,我要检查表是否为空。如果表为空,则希望使存储过程出错,并显示错误消息表空。

For example, I want to check if a table is empty. If the table is empty I wish to cause the stored procedure to error out with the error message "Table Empty".

这将允许我将错误冒泡到调用应用程序。

That will allow me to bubble up the error to the calling application.

推荐答案

TD13 +实现了标准SQL的SIGNAL / RESIGNAL

TD13+ implements Standard SQL's SIGNAL/RESIGNAL.

这篇关于Teradata:如何在存储过程中引发错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆