# mysql\_stmt\_fetch\_column

## Syntax

```c
int mysql_stmt_fetch_column(MYSQL_STMT * stmt,
                            MYSQL_BIND * bind_arg,
                            unsigned int column,
                            unsigned long offset);
```

* `stmt` - a statement handle, which was previously allocated by [mysql\_stmt\_init()](/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_init.md).
* `bind_arg` - a pointer to a `MYSQL_BIND` structure.
* `column` - number of columns, first column is numbered zero.
* `offset` - offset at which to begin retrieving data.

## Description

This function can be used to fetch large data of a single column in pieces. Returns zero on success, non-zero on failure.

{% hint style="info" %}
The size of the buffer is specified within `MYSQL_BIND` structure.
{% endhint %}

## See Also

* [mysql\_stmt\_fetch()](/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_fetch.md)
* [mysql\_stmt\_send\_long\_data()](/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_send_long_data.md)

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_fetch_column.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
