Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

select columns from 2 tables with foreign key

SELECT user.name, movie.name
FROM user
JOIN list  ON list.user_id  = user.id
JOIN movie ON list.movie_id = movie.id
ORDER BY 1,2;
Source by dba.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #select #columns #tables #foreign #key
ADD COMMENT
Topic
Name
5+5 =