Composite data types are values that are comprised of zero or more elements, where each element has a value of a particular data type.
SQL Anywhere supports the ROWS and ARRAYS composite data types. These data types are a more efficient way to store lists because they provide the ability to define the structure and data type of their values. They also make access to list elements easier to achieve, either directly, by using double square brackets; or as result set, by using the UNNEST operator. Consider using the ARRAY data type if you are storing lists as delimited strings in VARCHAR columns, and parsing them using sa_split_list. ARRAYS are very helpful when storing different objects that are all related in some ways. ROWS are helpful when storing multiple values related to one object.
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|