Hi Evgenij,
Thank you so much for your response.
Sure , I will check the feasibility in our application to pass an array of
column names or column indexes instead of that constant to request the
exact columns.
Regards,
Balamurali
On Fri, Mar 29, 2024 at 7:06 PM Evgenij Ryazanov wrote:
> When
When you use Statement.RETURN_GENERATED_KEYS, driver may choose what it
should return by itself, see JDBC™ 4.3 Specification, section 13.6. Modern
versions of H2 return primary key columns, identity columns, and columns
with non-constant default expression (including expressions inherited from
Hi Evgenij and Team,
As per my understanding the following prepared statement is
executed perfectly on H2DB and inserted in a row.
*prep1250: INSERT INTO `nim_entity_properties` (`id` ,`entity_type`
,`property_name` ,`data_type` ,`is_custom_property` ) VALUES (?,?,?,?,?)
{1: NULL, 2: 'incident'
Small correction on the table definition:
create table nim_entity_properties(
id int auto_increment DEFAULT ON NULL,
entity_type varchar(40),
property_name varchar(50)
)
On Fri, Mar 29, 2024 at 4:09 PM Balamurali Krishna Ippili <
balamurali.ipp...@broadcom.com> wrote:
> Hi Evgenij and Team,
>
>
Hi Evgenij and Team,
I have changed the tabl;e definition as like below:
create table nim_entity_properties(
id int auto_increment DEFAULT ON NULL,
entity_type varchar(40),
property_name varchar(50),
data_type varchar(40)
)
And now I am able to insert the row with the auto increment
Hi Evgenij,
Thanks for your quick reply and suggestion. Really appreciate it. I will
check further on your suggestion.
Thanks,
Balamurali
On Fri, Mar 29, 2024 at 3:06 PM Evgenij Ryazanov wrote:
> Hi!
>
> You shouldn't try to insert NULL into columns with NOT NULL constrains.
> Only non-null va
Hi!
You shouldn't try to insert NULL into columns with NOT NULL constrains.
Only non-null values or DEFAULT may be inserted into them.
H2 allows such incorrect insertions into identity columns only in Legacy,
HSLQDB, MariaDB, and MySQL compatibility modes.
You can also enable this feature for
I have tried to alter the table column for id as below and that is allowing
the insert statement but it is adding the new row with a duplicate id (1)
and the insertion successful. But I am expecting that id to be
count of current rows +1 so that is not helpful for me .
ALTER TABLE nim_entity_prop