![]() ![]() See also Section 9.21 about the aggregate function array_agg for use with arrays. Queries that access multiple tables (or multiple instances of the same table) at one time are called join queries. Select * from unnest(ARRAY, ARRAY) as x(a,b) → Queries can access multiple tables at once, or access the same table in such a way that multiple rows of the table are being processed at the same time. This form is only allowed in a query's FROM clause see Section 7.2.1.4. If the arrays are not all the same length then the shorter ones are padded with NULLs. Unnest ( anyarray, anyarray ) → setof anyelement, anyelement Įxpands multiple arrays (possibly of different data types) into a set of rows. This function allows you to input a range of values, such as those in a column, and get the sum total of those numbers. An example of an aggregate function is SUM. The array's elements are read out in storage order. However, aggregate functions are different because you can use them on multiple rows and get a single value as a result. If the arrays are not of identical element types, they will be coerced to a common type (see Section 10.5).ĪRRAY || ARRAY → Įxpands an array into a set of rows. Concatenating a null or empty array is a no-op otherwise the arrays must have the same number of dimensions (as illustrated by the first example) or differ in number of dimensions by one (as illustrated by the second). ![]() Is the first array contained by the second?ĭo the arrays overlap, that is, have any elements in common?Īnycompatiblearray || anycompatiblearray → anycompatiblearrayĬoncatenates the two arrays. Does the first array contain the second, that is, does each element appearing in the second array equal some element of the first array? (Duplicates are not treated specially, thus ARRAY and ARRAY are each considered to contain the other.) ![]()
0 Comments
Leave a Reply. |