Mengakses elemen array dengan zero-based index, mengembalikan NULL jika out of bounds.
Element type or NULLDiperbarui: 16 Mei 2026array[SAFE_OFFSET(zero_based_index)]Index dimulai dari 0
1 SELECT 2 arr[SAFE_OFFSET(0)] as first, 3 arr[SAFE_OFFSET(10)] as out_of_bounds 4 FROM (SELECT ['a', 'b', 'c'] as arr);
Akses aman tanpa error.
| first | out_of_bounds |
|---|---|
| a | NULL |
Sudah paham SAFE_OFFSET? Latih langsung di browser
Latihan interaktif, langsung di browser.