Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT * FROM tableA
- LEFT JOIN tableB ON tableB.id = tableA.id
- WHERE tableA.name = 'myName'
- tableA tableB
- ----------- -----------
- id name id school
- ----------- -----------
- 1 a 1 AA
- 2 b 2 BB
- 3 c 3 CC
- 4 d 4 DD
- 5 e 5 EE
- SELECT * FROM
- (
- SELECT * FROM tableA
- WHERE name = 'e'
- ) A LEFT JOIN tableB ON tableB.id = A.id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement