0

How to join tables

by using join claus

20th Nov 2016, 8:48 AM
Ravi Soni
Ravi Soni - avatar
2 Respuestas
+ 3
STUDENT(Id, Name, Surname, Age, UniversityId) UNIVERSITY(Id, Name, City, Country, WorldRank) Your boss want to know all Students' surname that belong to Pisa University. You must use Join cause the information is Split between the two table. SELECT S.Surname FROM Student S INNER JOIN University U ON S.UniversityId = U.id WHERE U.City = "Pisa";
20th Nov 2016, 9:15 AM
Matteo Tardelli
Matteo Tardelli - avatar
0
select s.surname from student s inner join university u on s.id=u.id where u.name='Pisa University'
21st Feb 2017, 10:39 AM
PARASCHIVESCU ADRIAN