DESCRIBE

|               DESCRIBE                |                            |                            |                  |                                 |
|:-------------------------------------:|----------------------------|----------------------------|------------------|---------------------------------|
|[Prev](ecpg-sql-declare-statement.html)|[Up](ecpg-sql-commands.html)|36.14. Embedded SQL Commands|[Home](index.html)| [Next](ecpg-sql-disconnect.html)|

---

## DESCRIBE

DESCRIBE — obtain information about a prepared statement or result set

## Synopsis

```
DESCRIBE [ OUTPUT ] prepared_name USING [ SQL ] DESCRIPTOR descriptor_name
DESCRIBE [ OUTPUT ] prepared_name INTO [ SQL ] DESCRIPTOR descriptor_name
DESCRIBE [ OUTPUT ] prepared_name INTO sqlda_name

```

## Description

`DESCRIBE` retrieves metadata information about the result columns contained in a prepared statement, without actually fetching a row.

## Parameters

*`prepared_name`*

 The name of a prepared statement. This can be an SQL identifier or a host variable.

*`descriptor_name`*

 A descriptor name. It is case sensitive. It can be an SQL identifier or a host variable.

*`sqlda_name`*

 The name of an SQLDA variable.

## Examples

```
EXEC SQL ALLOCATE DESCRIPTOR mydesc;
EXEC SQL PREPARE stmt1 FROM :sql_stmt;
EXEC SQL DESCRIBE stmt1 INTO SQL DESCRIPTOR mydesc;
EXEC SQL GET DESCRIPTOR mydesc VALUE 1 :charvar = NAME;
EXEC SQL DEALLOCATE DESCRIPTOR mydesc;

```

## Compatibility

`DESCRIBE` is specified in the SQL standard.

## See Also

[ALLOCATE DESCRIPTOR](ecpg-sql-allocate-descriptor.html), [GET DESCRIPTOR](ecpg-sql-get-descriptor.html)

---

|[Prev](ecpg-sql-declare-statement.html)|[Up](ecpg-sql-commands.html)| [Next](ecpg-sql-disconnect.html)|
|:--------------------------------------|:--------------------------:|--------------------------------:|
|           DECLARE STATEMENT           |     [Home](index.html)     |            DISCONNECT           |

 // \<![CDATA[ \<-- For SVG support if ('WebSocket' in window) { (function() { function refreshCSS() { var sheets = [].slice.call(document.getElementsByTagName("link")); var head = document.getElementsByTagName("head")[0]; for (var i = 0; i \< sheets.length; ++i) { var elem = sheets[i]; head.removeChild(elem); var rel = elem.rel; if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") { var url = elem.href.replace(/(&|\\?)\_cacheOverride=\\d+/, ''); elem.href = url + (url.indexOf('?') \>= 0 ? '&' : '?') + '\_cacheOverride=' + (new Date().valueOf()); } head.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function(msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; console.log('Live reload enabled.'); })(); } // ]]\>