Skip to content
Advertisement

What is the syntax of array literal in H2 db?

I need to write an insert query where one value is an array of 3 elements. I’ve tried to do it like this:

The sintax I’ve used for ‘col’ value is valid array literal in PostrgreSQL but H2 treats it as a single value of the array but not as an array with 3 elements.

Table DDL:

Advertisement

Answer

Based on SQL Grammar:

enter image description here

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement