2
In my system I have 3 tables:
-Table Film - a film features several artists
-Artista Table
-Table Participates in film - this table, contains the ID’s of the movie and artist table.
When I want to select a film with all its artists I do the following:
select ar.*, f.* from filme as f inner join participa_filme as pf on pf.id_filme = f.id_filme inner join artista as ar on ar.id_artista = pf.id_artista
Ai he returns me, all artist of the movie Titanic
my question is, is there any way I can return just one Titanic movie record with all its artists ? without creating a line for each movie artist.
You want to create a column with all artists, ex: Leonardo, Kate Winslet, etc
– Jeferson Almeida
That’s right @Jefersonalmeida
– Rodrigo Jacinto
Which database you are using, the answer will be different depending on which you are using?
– Jeferson Almeida
I’m using Postgresql, because that’s the way it is, in my system it’s creating an object for each artist, and I want it to create just one movie object from all its artists. @Jefersonalmeida
– Rodrigo Jacinto