INTERVIEW QUESTIONS
GENERAL
INTERESTS
DETAILS
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: 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;
|
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:
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; Source: CoolInterview.com
i think it's right query for this question. select sid,name where course=3 from student; Source: CoolInterview.com
Answered by: vineel | Date:
| Contact vineel
the following query is right i suppose: select s.sid,s.name from student s,level l where s.sid=l.sid and l.level='freshman' and s.course=3; Source: CoolInterview.com
Answered by: anand | Date: 8/3/2008
| Contact anand
select s.sid,s.name from student s,level l where s.sid=l.sid and l.level='freshman' and s.course=3 Source: CoolInterview.com
Answered by: maheshwari | Date: 9/8/2008
| Contact maheshwari
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|