please give a uniqe answer and not hand writing thanks ..... You have three tabl
ID: 3574899 • Letter: P
Question
please give a uniqe answer and not hand writing thanks .....
You have three tables in your relational database: Student, Course, and TakenBy.
What information will result from the following SQL query applied to this relational database?
SELECT StudentID, Name
FROM Student, TakenBy
WHERE Student.StudentID=TakenBy.StudentID
AND CourseID=C1
AND GradeEarned=A;
Explanation / Answer
Actually it will give error as ambiguous column defined for StudentID in select. Please change that to
select student.StudentID,name
The condition matches for 3 common records in both tables and for all students as all have enrolled for course C1 and earned A in all those. so the output will be like
StudentID | Name
------------------------
S1 Ahmed
S2 Sultan
S3 Rached
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.