Search code examples
sqldatabasevariable-length-array

variable length field in Database


Is there any way to store variable length list into database in SQL or any other database engine ??

Here list means no. of elements in the array. For e.g. an array of numbers.

But in my actual application things to be stored are objects and hence cannot be stored simply as comma separated list.


Solution

  • Some SQL databases support the ARRAY type as the type of a column. An ARRAY is variable length and can hold objects of the same type. See details below which apply to databases that support the SQL Standard:

    http://hsqldb.org/doc/2.0/guide/sqlgeneral-chapt.html#N106FE