A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/en/sql-reference/sql/desc-procedure below:

DESCRIBE PROCEDURE | Snowflake Documentation

Reference SQL command reference Functions, procedures, & scripting DESCRIBE PROCEDURE DESCRIBE PROCEDURE

Describes the specified stored procedure, including the stored procedure’s signature (i.e. arguments), return value, language, and body (i.e. definition).

See also:

DROP PROCEDURE , ALTER PROCEDURE , CREATE PROCEDURE , SHOW PROCEDURES, SHOW USER PROCEDURES

Syntax
DESC[RIBE] PROCEDURE <procedure_name> ( [ <arg_data_type> [ , <arg_data_type_2> ... ] ] )

Copy

Usage notes Examples

This example shows how to describe a stored procedure that has no parameters:

DESC PROCEDURE my_pi();
+---------------+----------------------+
| property      | value                |
|---------------+----------------------|
| signature     | ()                   |
| returns       | FLOAT                |
| language      | JAVASCRIPT           |
| null handling | CALLED ON NULL INPUT |
| volatility    | VOLATILE             |
| execute as    | CALLER               |
| body          |                      |
|               |   return 3.1415926;  |
|               |                      |
+---------------+----------------------+

Copy

This example shows how to describe a stored procedure that has a parameter:

DESC PROCEDURE area_of_circle(FLOAT);
+---------------+------------------------------------------------------------------+
| property      | value                                                            |
|---------------+------------------------------------------------------------------|
| signature     | (RADIUS FLOAT)                                                   |
| returns       | FLOAT                                                            |
| language      | JAVASCRIPT                                                       |
| null handling | CALLED ON NULL INPUT                                             |
| volatility    | VOLATILE                                                         |
| execute as    | OWNER                                                            |
| body          |                                                                  |
|               |   var stmt = snowflake.createStatement(                          |
|               |       {sqlText: "SELECT pi() * POW($RADIUS, 2)", binds:[RADIUS]} |
|               |       );                                                         |
|               |   var rs = stmt.execute();                                       |
|               |   rs.next()                                                      |
|               |   var output = rs.getColumnValue(1);                             |
|               |   return output;                                                 |
|               |                                                                  |
+---------------+------------------------------------------------------------------+

Copy


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4