Home > Software engineering >  Insert BigDecimal from Java to Decimal in h2 database
Insert BigDecimal from Java to Decimal in h2 database

Time:02-19

I have create this table here:

enter image description here

As you can see from above. It successfully created a table However, when I tried this command:

I also tried to do in the h2 database: enter image description here

At this point, I don't know where I did wrong. Is this my syntax or the bigdecimal problem. Please help me.

CodePudding user response:

When you do the insert specify the columns by name

insert into mystock (name, date, open, high, low, close) values (....);

BTW Date is not a good column name

CodePudding user response:

try this:

insert into mystock(name, date, open, high, low, close) values (...)
  • Related