~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/replace.rst

  • Committer: Joseph Daly
  • Date: 2010-10-30 01:01:48 UTC
  • mfrom: (1891 staging)
  • mto: This revision was merged to the branch mainline in revision 1900.
  • Revision ID: skinny.moey@gmail.com-20101030010148-k39lnrftv4bkbux9
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Replacing Data
2
 
==============
 
2
========
3
3
 
4
4
In Dizzle you can make use of REPLACE to insert a new record into a table or
5
5
delete and insert a record in a table if a record matching the primary key
8
8
 
9
9
A typical query:
10
10
 
11
 
.. code-block:: mysql
12
 
 
13
 
   REPLACE INTO table_1 SET a=5;
 
11
REPLACE INTO table_1 SET a=5;
14
12
 
15
13
or
16
14
 
17
 
.. code-block:: mysql
18
 
 
19
 
   REPLACE INTO table_1 VALUES (4);
20
 
 
21
 
 
22
 
REPLACE is an extension to the SQL Standard that first appeared in MySQL.
 
15
REPLACE INTO table_1 VALUES (4);
 
16
 
 
17
 
 
18
REPLACE is an extension to the SQL Standard that firtst appeared in MySQL.