postgresql array last element 1

postgresql array last element

arr[array_length(arr, 1)]

Here is what the above code is Doing:
1. We’re creating a 2D array with 3 rows and 4 columns.
2. We’re printing the length of the array.
3. We’re printing the length of the first row.
4. We’re printing the length of the second row.
5. We’re printing the length of the third row.
6. We’re printing the length of the first column.
7. We’re printing the length of the second column.
8. We’re printing the length of the third column.
9. We’re printing the length of the fourth column.

Similar Posts