Noticed that a Merge fails (as in does not apply changes) without
errors/notification when the data being updated or even inserted
exceeds the column definition. Following is a test case. I would have
expected the Merge to either silently truncate (at least in case of
strings) or throw an error like it does in Inserts.
---------------------------------------------------------------------------------------------------------------------------------------------------
create table TestTbl (
col0 identity,
col1 varchar(1),
col2 char(1),
col3 int
)
insert into Testtbl (col1, col2 , col3 ) values ('1', '2', 33333);
insert into Testtbl (col1, col2 , col3 ) values (null, '2', 33333);
insert into Testtbl (col1, col2 , col3 ) values ('1', null, 33333);
insert into Testtbl (col1, col2 , col3 ) values ('11', '2', 33333);
insert into Testtbl (col1, col2 , col3 ) values ('1', '22', 33333);
insert into Testtbl (col1, col2 , col3 ) values ('1', '2', 333333);
SELECT * FROM TESTTBL ;
--Fails
MERGE into Testtbl values (1, '1', '3', 333333);
MERGE into Testtbl values (2, '11', '4', 333333);
MERGE into Testtbl values (3, '1', '555', 333333);
--Fails
MERGE into Testtbl values (6, '1', '6', 3333333);
SELECT * FROM TESTTBL
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.