can i use 2 columns of sql table as foreign keys on another table code example
Example 1: select columns from 2 tables with foreign key
SELECT user.name, movie.name
FROM user, movie, list
WHERE list.user_id = user.id
AND list.movie_id = movie.id
ORDER BY 1,2;
Example 2: 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;