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?

SELECT Student.name, Student.SIDFROM Student, LevelWHERE Student.SID = Level.SIDAND Level.Level = "freshman"AND Student.Course = 3;

Showing Answers 1 - 2 of 2 Answers

Behnam

  • Dec 10th, 2005
 

select Name,SID from student

where Course=3 and SID in ( select SID from Level where Level='freshman' )

  Was this answer useful?  Yes

Asheesh pandey

  • Dec 26th, 2005
 

I think this is the right answer of the above query:

SELECT Student.name, Student.SID FROM Student, Level

WHERE Student.SID = Level.SID
AND Level.Level = "freshman"
AND Student.Course = 3;

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions