]> begriffs open source - ai-pg/blob - full-docs/txt/ecpg-sql-describe.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / ecpg-sql-describe.txt
1
2 DESCRIBE
3
4    DESCRIBE — obtain information about a prepared statement or result set
5
6 Synopsis
7
8 DESCRIBE [ OUTPUT ] prepared_name USING [ SQL ] DESCRIPTOR descriptor_name
9 DESCRIBE [ OUTPUT ] prepared_name INTO [ SQL ] DESCRIPTOR descriptor_name
10 DESCRIBE [ OUTPUT ] prepared_name INTO sqlda_name
11
12 Description
13
14    DESCRIBE retrieves metadata information about the result columns
15    contained in a prepared statement, without actually fetching a row.
16
17 Parameters
18
19    prepared_name #
20           The name of a prepared statement. This can be an SQL identifier
21           or a host variable.
22
23    descriptor_name #
24           A descriptor name. It is case sensitive. It can be an SQL
25           identifier or a host variable.
26
27    sqlda_name #
28           The name of an SQLDA variable.
29
30 Examples
31
32 EXEC SQL ALLOCATE DESCRIPTOR mydesc;
33 EXEC SQL PREPARE stmt1 FROM :sql_stmt;
34 EXEC SQL DESCRIBE stmt1 INTO SQL DESCRIPTOR mydesc;
35 EXEC SQL GET DESCRIPTOR mydesc VALUE 1 :charvar = NAME;
36 EXEC SQL DEALLOCATE DESCRIPTOR mydesc;
37
38 Compatibility
39
40    DESCRIBE is specified in the SQL standard.
41
42 See Also
43
44    ALLOCATE DESCRIPTOR, GET DESCRIPTOR