~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/replace.rst

  • Committer: Padraig O'Sullivan
  • Date: 2010-10-16 19:31:35 UTC
  • mto: (1859.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1860.
  • Revision ID: osullivan.padraig@gmail.com-20101016193135-75fdbfizty54g9of
Replaced a uint8_t member with a standard bitset since it was being used as a bitset....

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Replacing Data
2
 
==============
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
 
 
11
 
REPLACE INTO table_1 SET a=5;
12
 
 
13
 
or
14
 
 
15
 
REPLACE INTO table_1 VALUES (4);
16
 
 
17
 
 
18
 
REPLACE is an extension to the SQL Standard that firtst appeared in MySQL.