Oracle 5.0 Reference Manual page 2182

Table of Contents

Advertisement

statements that store a value into an
INSERT
value is automatically generated by storing the special values
explicit nonspecial value.
• In the case of a multiple-row
automatically generated
explicit value inserted into the
If no rows are successfully inserted,
• Starting in MySQL 5.0.54, if an
generated value is successfully inserted,
row.
statements that generate an
INSERT
LAST_INSERT_ID(expr)
LAST_INSERT_ID(expr)
• If the previous statement returned an error, the value of
mysql_insert_id()
If you need to save the value for later, be sure to call
statement that generates the value.
The value of
set.
The value of
connection. It is not affected by statements issued by other clients.
The
LAST_INSERT_ID()
value, and is not reset between statements because the value of that function is maintained in the
server. Another difference from
updated if you set an
"Information
mysql_insert_id()
an
AUTO_INCREMENT
statement within the procedure. Within the procedure, you can use
SQL level to obtain the
The reason for the differences between
LAST_INSERT_ID()
more exact information about what happens to the
Return Values
Described in the preceding discussion.
Errors
None.
20.6.6.38.
mysql_kill()
int mysql_kill(MYSQL *mysql, unsigned long pid)
Description
Asks the server to kill the thread specified by pid.
C API Function Descriptions
INSERT
AUTO_INCREMENT
AUTO_INCREMENT
INSERT ... SELECT
[961]
[961].
returns
if the previous statement does not use an
0
mysql_insert_id()
mysql_insert_id()
[961]
SQL function returns the most recently generated
mysql_insert_id()
AUTO_INCREMENT
Functions".
returns
following a
0
value because in this case
AUTO_INCREMENT
[961]
is made easy to use in scripts while
AUTO_INCREMENT
statement,
mysql_insert_id()
value; if no such value is generated, it returns the last
column.
mysql_insert_id()
statement is executed, and no automatically
mysql_insert_id()
AUTO_INCREMENT
into any column or by updating any column to
mysql_insert_id()
is not affected by statements such as
is affected only by statements issued within the current client
is that
column to a specific nonspecial value. See
statement for a stored procedure that generates
CALL
mysql_insert_id()
value.
LAST_INSERT_ID()
AUTO_INCREMENT
2162
column. This is true whether the
or
into the column, or is an
NULL
0
returns the first
returns 0.
returns the ID of the last inserted
value by inserting
mysql_insert_id()
AUTO_INCREMENT
immediately after the
SELECT
LAST_INSERT_ID()
applies to
LAST_INSERT_ID()
[961]
and
mysql_insert_id()
mysql_insert_id()
column.
is undefined.
value.
that return a result
AUTO_INCREMENT
[961]
is not
Section 12.13,
and not the
CALL
[961]
at the
is that
tries to provide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents