DEV Community

[Comment from a deleted post]
Collapse
 
firozansari profile image
Firoz Ansari

My OCD kicked in with the single line SQL Queries.

SELECT users.id, accounts.name 
from users, accounts 
where users.account_id = 1 
    AND users.account_id = accounts.id
SELECT users.id, accounts.name
from users 
INNER JOIN accounts on accounts.id = users.account_id 
where users.account_id = 1