Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
Databricks SQL
Databricks Runtime
Throws an exception with expr as the message.
Syntax
raise_error(expr)
Arguments
expr: ASTRINGexpression.
Returns
The NULL type.
The function raises a runtime error with expr as the error message.
Applies to:
Databricks SQL
Databricks Runtime 14.2 and above
The returned error condition is USER_RAISED_EXCEPTION and the SQLSTATE is P0001.
See Handling error conditions for details on handling error conditions.
Examples
> SELECT raise_error('custom error message');
[USER_RAISED_EXCEPTION] custom error message SQLSTATE: P0001