-
+
Arrays
(1 row)
- We could also have written:
+ If any dimmension is written as a slice, i.e contains a colon, then all
+ dimmensions are treated as slices. If a dimmension is missing, it is
+ assumed to be [1:1]>. If a dimmension has only a single
+ number (no colon), that dimmension is treated as being from 1>
+ to the number specified. For example, [2]> is treated as
+ [1:2], as in this example:
-SELECT schedule[1:2][1] FROM sal_emp WHERE name = 'Bill';
-
-
- with the same result. An array subscripting operation is always taken to
- represent an array slice if any of the subscripts are written in the form
- lower:upper.
- A lower bound of 1 is assumed for any subscript where only one value
- is specified, as in this example:
SELECT schedule[1:2][2] FROM sal_emp WHERE name = 'Bill';
schedule