Imported upstream version 1.5
[manpages-zh.git] / raw / man7 / execute.7
blob684dbf0d10b1d9c2a470fdc7991b30f5b41e9cb6
1 .\\" auto-generated by docbook2man-spec $Revision: 1.1 $
2 .TH "EXECUTE" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
3 .SH NAME
4 EXECUTE \- execute a prepared statement
6 .SH SYNOPSIS
7 .sp
8 .nf
9 EXECUTE \fIplan_name\fR [ (\fIparameter\fR [, ...] ) ]
10 .sp
11 .fi
12 .SH "DESCRIPTION"
13 .PP
14 \fBEXECUTE\fR is used to execute a previously prepared
15 statement. Since prepared statements only exist for the duration of a
16 session, the prepared statement must have been created by a
17 \fBPREPARE\fR statement executed earlier in the
18 current session.
19 .PP
20 If the \fBPREPARE\fR statement that created the statement
21 specified some parameters, a compatible set of parameters must be
22 passed to the \fBEXECUTE\fR statement, or else an
23 error is raised. Note that (unlike functions) prepared statements are
24 not overloaded based on the type or number of their parameters; the
25 name of a prepared statement must be unique within a database session.
26 .PP
27 For more information on the creation and usage of prepared statements,
28 see PREPARE [\fBprepare\fR(7)].
29 .SH "PARAMETERS"
30 .TP
31 \fB\fIplan_name\fB\fR
32 The name of the prepared statement to execute.
33 .TP
34 \fB\fIparameter\fB\fR
35 The actual value of a parameter to the prepared statement. This
36 must be an expression yielding a value of a type compatible with
37 the data type specified for this parameter position in the
38 \fBPREPARE\fR command that created the prepared
39 statement.
40 .SH "COMPATIBILITY"
41 .PP
42 The SQL standard includes an \fBEXECUTE\fR statement,
43 but it is only for use in embedded SQL. This version of the
44 \fBEXECUTE\fR statement also uses a somewhat different
45 syntax.