Search
 
SCRIPT & CODE EXAMPLE
 

SQL

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;
Comment

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;
Comment

PREVIOUS NEXT
Code Example
Sql :: laravel subquery in from clause 
Sql :: SQL SMALLDATETIME Data Type 
Sql :: postgres drop type 
Sql :: sqlalchemy filter by relationship 
Sql :: how mysql store datetime 
Sql :: oracle select 
Sql :: drop constraint in ms sql 
Sql :: Deleting data from tables 
Sql :: mysql curdate between two dates 
Sql :: xampp mysql problem detected port 3306 in use by 
Sql :: arithmetic expression in sql 
Sql :: import database from sql file 
Sql :: stored procedure 
Sql :: datatables server side filter where clause 
Sql :: online sql compiler 
Sql :: how do you insert boolean to postgresql 
Sql :: SQL Equal to Operator 
Sql :: sql to linq converter 
Sql :: sql select condition with left join 
Sql :: ring MySQL get a list of columns names 
Sql :: oracle sql date winter time 
Sql :: First Step in installing SQL workbench 
Sql :: sql mod even odd 
Sql :: postgres multiple left join causing duplicates jsonb_agg 
Sql :: ms sql bacup table 
Sql :: sql select query 
Sql :: PSQL qith variables 
Sql :: sql delete all except 
Sql :: create view in sql server that contain multiple select statements 
Sql :: SQL Combining Multiple Operators 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =