| |
GeekInterview.com > Interview Questions > General > Interests
| Print | |
Question: Given two tables Student(SID, Name, Course) and Level(SID, level) write the SQL statement to get the name and SID of the student who are taking course = 3 and at freshman level?
Answer: SELECT Student.name, Student.SIDFROM Student, Level WHERE Student.SID = Level.SID AND Level.Level = "freshman" AND Student.Course = 3; |
| December 12, 2005 14:57:29 |
#1 |
| Behnam |
Member Since: Visitor Total Comments: N/A |
RE: Given two tables Student(SID, Name, Course) and Le... |
select Name,SID from student where Course=3 and SID in ( select SID from Level where Level='freshman' ) |
| |
Back To Question | |