Best practices for the order of joined columns in a sql join? -
there's big give-and-take going on @ office on order of joined columns in sql join. i'm finding hard explaining i'll nowadays 2 sql statements. 1 improve taking business relationship sql best practices?
select a.au_id authors inner bring together titleauthor ta on a.au_id = ta.au_id inner bring together titles t on ta.title_id = t.title_id t.title ‘%computer%’ or
select a.au_id authors inner bring together titleauthor ta on ta.au_id = a.au_id inner bring together titles t on t.title_id = ta.title_id t.title ‘%computer%’ so, in join, in on part, matter whether write a.x = b.y or b.y = a.x?
the best practice here take 1 , stick within team. personally, prefer from bring together b on b.col = a.col because seems cleaner me.
sql
No comments:
Post a Comment