> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/selecting-data/procedure.md).

# PROCEDURE

The `PROCEDURE` clause of [SELECT](/docs/server/reference/sql-statements/data-manipulation/selecting-data/select.md) passes the whole result set to a Procedure which will process it. These Procedures are not [Stored Procedures](/docs/server/server-usage/stored-routines/stored-procedures.md), and can only be written in the C language, so it is necessary to recompile the server.

Currently, the only available procedure is [ANALYSE](/docs/server/reference/sql-functions/secondary-functions/information-functions/procedure-analyse.md), which examines the resultset and suggests the optimal datatypes for each column. It is defined in the `sql/sql_analyse.cc` file, and can be used as an example to create more Procedures.

This clause cannot be used in a [view](/docs/server/server-usage/views.md) definition.

## See Also

* [SELECT](/docs/server/reference/sql-statements/data-manipulation/selecting-data/select.md)
* [Stored Procedures](/docs/server/server-usage/stored-routines/stored-procedures.md)

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
