Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
5b0c7b5a
Commit
5b0c7b5a
authored
Jun 20, 2002
by
arjen@fred.bitbike.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarified REPLACE command a bit.
parent
fa15bc6f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
Docs/manual.texi
Docs/manual.texi
+8
-3
No files found.
Docs/manual.texi
View file @
5b0c7b5a
...
...
@@ -34520,9 +34520,10 @@ or REPLACE [LOW_PRIORITY | DELAYED]
@end example
@code{REPLACE} works exactly like @code{INSERT}, except that if an old
record in the table has the same value as a new record on a unique index,
the old record is deleted before the new record is inserted.
@xref{INSERT, , @code{INSERT}}.
record in the table has the same value as a new record on a @code{UNIQUE}
index or @code{PRIMARY KEY}, the old record is deleted before the new
record is inserted.
@xref{INSERT, ,@code{INSERT}}.
In other words, you can't access the values of the old row from a
@code{REPLACE} statement. In some old MySQL versions it appeared that
...
...
@@ -34536,6 +34537,10 @@ This fact makes it easy to determine whether @code{REPLACE} added
or replaced a row: check whether the affected-rows value is 1 (added)
or 2 (replaced).
Note that unless you use a @code{UNIQUE} index or @code{PRIMARY KEY},
using a @code{REPLACE} command makes no sense, since it would just do
an @code{INSERT}.
@node LOAD DATA, DO, REPLACE, Data Manipulation
@subsection @code{LOAD DATA INFILE} Syntax
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment