- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
merge tablename as target
using (values ('new value', 'different value'))
as source (field1, field2)
on target.idfield = 7
when matched then
update
set field1 = source.field1,
field2 = source.field2,
...
when not matched then
insert ( idfield, field1, field2, ... )
values ( 7, source.field1, source.field2, ... )
LispGovno 13.02.2015 20:21 # 0
kegdan 13.02.2015 20:33 # 0
как у индусов
Lokich 16.02.2015 12:14 # 0
defecate-plusplus 16.02.2015 13:17 # 0
> values ( 7
да всё же говно тут
bormand 16.02.2015 14:41 # 0
Lokich 16.02.2015 22:10 # 0