IniziaInizia gratis

Accessing data in an ARRAY

In our DVD Rentals database, the film table contains an ARRAY for special_features which has a type of TEXT[]. Much like any ARRAY data type in PostgreSQL, a TEXT[] array can store an array of TEXT values. This comes in handy when you want to store things like phone numbers or email addresses as we saw in the lesson.

Let's take a look at the special_features column and also practice accessing data in the ARRAY.

Questo esercizio fa parte del corso

Functions for Manipulating Data in PostgreSQL

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

-- Select the title and special features column 
SELECT 
  ___, 
  ___ 
FROM film;
Modifica ed esegui il codice