mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
INSERT ... UPDATE ... VALUES()
This commit is contained in:
parent
a20b167cae
commit
b33115ecf9
19 changed files with 166 additions and 67 deletions
|
|
@ -48,4 +48,12 @@ a b c
|
|||
3 4 120
|
||||
5 0 30
|
||||
8 9 60
|
||||
INSERT t1 VALUES (2,1,11), (7,4,40) ON DUPLICATE KEY UPDATE c=c+VALUES(a);
|
||||
SELECT *, VALUES(a) FROM t1;
|
||||
a b c VALUES(a)
|
||||
1 2 10 NULL
|
||||
3 4 127 NULL
|
||||
5 0 30 NULL
|
||||
8 9 60 NULL
|
||||
2 1 11 NULL
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue