3 ms·
I prefer person and person_id because when joining to to other tables it is easier (in my head) to join person_id to person_id than person_id to id
by ed_elliott_asc 7y ago
I prefer person and person_id because when joining to to other tables it is easier (in my head) to join person_id to person_id than person_id to id
- Nicksil 7y agoHave you tried creating an alias in your statement(s)? Using `AS` to make this explicit may further help. Just a suggestion.
- ed_elliott_asc 7y agoyes but it is still an akwardness i prefer to avoid by using tablename_id like you'd have to do something like "select id as tablename_id, * from table" just doesn't feel quite right to me personally
- jolmg 7y agohow about person_id to person.id?
- combatentropy 7y agoselect * from person join phone on person.id = phone.person