What is the valid SQL among the following two?
Shall I join by IDs or parent/child names? These two SQLs yield different row counts.
select *
from
cwd_user u,
cwd_group g,
cwd_membership m
where
m.child_id = u.id and
m.parent_id = g.id;
select *
from
cwd_user u,
cwd_group g,
cwd_membership m
where
m.lower_child_name = u.lower_user_name and
m.lower_parent_name = g.lower_group_name;