I have two tables in Oracle database called tbl_genres
and tbl_movies
theirs basic schema looks like this
tbl_genres
tbl_movies
Now what I need to have is updating the output only on SELECT statement without applying update into tbl_movies
and getting a result like this
This can be accomplished using an INNER JOIN:
select t1.movie as Movie, t2.genre_name as Genre from tbl_movies as t1
inner join tbl_genres as t2 on t1.m_genre=t2.genreid;
This works by selecting the movie and genre columns, and joining them together on the basis of a common identifier (in this case, m_genre/genre_id).