Malik Shahroze Malik Shahroze - 1 year ago 105
MySQL Question

Comparing and extrating data from two tables in sql

I am working on a project and I need to write a query in which I can list all courses that have "Database System Principles" as prerequisite
There are two tables one is by name course and other is by name prereqs which contain information about courses that which course has how many and which pre-requisites

5. please click to check the two tables here

Answer Source

Try this

Select * from Course as c JOIN prereqs on c.course_ID = prereqs.course_ID WHERE = "Database System Principles"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download