Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

LIST/SEQUENCE

Description

LIST (=SEQUENCE) is a collection type in which the input order of elements is preserved, and duplications are allowed. Elements of a LIST are allowed to have only one data type. It can have records of other tables.

Example

CREATE TABLE list_tbl ( col_1 list(CHAR(1)));

INSERT INTO list_tbl VALUES ({'c','c','c','b','b', 'a'});

SELECT * FROM list_tbl;

  col_1

======================

  {'c', 'c', 'c', 'b', 'b', 'a'}

 

SELECT CAST(col_1 AS SET), CAST(col_1 AS MULTISET) FROM list_tbl;

   cast(col_1 as set)  cast(col_1 as multiset)

============================================

  {'a', 'b', 'c'}  {'a', 'b', 'b', 'c', 'c', 'c'}