~drizzle-trunk/drizzle/development

1878.5.4 by Brian Aker
Update documentation.
1
Replacing Data
1900.2.6 by Stewart Smith
fix docs warning: underline/overline too short for replace.rst
2
==============
1878.5.4 by Brian Aker
Update documentation.
3
4
In Dizzle you can make use of REPLACE to insert a new record into a table or
5
delete and insert a record in a table if a record matching the primary key
6
already exists. If no primary key or unique constraint is found on the table
7
then REPLACE is equivalent to INSERT.
8
9
A typical query:
10
2165.2.5 by Andrew Hutchings
Make fixes to temporal docs
11
.. code-block:: mysql
12
13
   REPLACE INTO table_1 SET a=5;
1878.5.4 by Brian Aker
Update documentation.
14
15
or
16
2165.2.5 by Andrew Hutchings
Make fixes to temporal docs
17
.. code-block:: mysql
18
19
   REPLACE INTO table_1 VALUES (4);
1878.5.4 by Brian Aker
Update documentation.
20
21
1994.5.15 by Stewart Smith
fix tpyo
22
REPLACE is an extension to the SQL Standard that first appeared in MySQL.