You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example I have 2 tables:
class(
id int not null,
school varchar(32),
name varchar(32),
)
student(
id int not null,
name varchar(32),
class_id int,
school varchar(32),
)
I want to select like this:
select s.name,c.name from student s left join class c on s.class_id = c.id and s.school = c.school where s.id = 10;
How should I write Relation and queries?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For example I have 2 tables:
class(
id int not null,
school varchar(32),
name varchar(32),
)
student(
id int not null,
name varchar(32),
class_id int,
school varchar(32),
)
I want to select like this:
select s.name,c.name from student s left join class c on s.class_id = c.id and s.school = c.school where s.id = 10;
How should I write Relation and queries?
Beta Was this translation helpful? Give feedback.
All reactions