]> begriffs open source - ai-pg/blob - full-docs/txt/sql-execute.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-execute.txt
1
2 EXECUTE
3
4    EXECUTE — execute a prepared statement
5
6 Synopsis
7
8 EXECUTE name [ ( parameter [, ...] ) ]
9
10 Description
11
12    EXECUTE is used to execute a previously prepared statement. Since
13    prepared statements only exist for the duration of a session, the
14    prepared statement must have been created by a PREPARE statement
15    executed earlier in the current session.
16
17    If the PREPARE statement that created the statement specified some
18    parameters, a compatible set of parameters must be passed to the
19    EXECUTE statement, or else an error is raised. Note that (unlike
20    functions) prepared statements are not overloaded based on the type or
21    number of their parameters; the name of a prepared statement must be
22    unique within a database session.
23
24    For more information on the creation and usage of prepared statements,
25    see PREPARE.
26
27 Parameters
28
29    name
30           The name of the prepared statement to execute.
31
32    parameter
33           The actual value of a parameter to the prepared statement. This
34           must be an expression yielding a value that is compatible with
35           the data type of this parameter, as was determined when the
36           prepared statement was created.
37
38 Outputs
39
40    The command tag returned by EXECUTE is that of the prepared statement,
41    and not EXECUTE.
42
43 Examples
44
45    Examples are given in Examples in the PREPARE documentation.
46
47 Compatibility
48
49    The SQL standard includes an EXECUTE statement, but it is only for use
50    in embedded SQL. This version of the EXECUTE statement also uses a
51    somewhat different syntax.
52
53 See Also
54
55    DEALLOCATE, PREPARE