Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

I'm working on the following query, please help

$
0
0
Please consider the following tables:

Code:

Table Name: Person

Person_Id  Name


Table Name: DVD

DVD_ID  Owner_ID  Title

Here is the query:
Write a query that returns the list of DVDs that belong to owners who own “Superman”

Here is my solution:

Code:

SELECT p.name,d.dvd_id
FROM  DVD d,Person p
WHERE p.person_id = d.dvd_id
AND Title = 'Superman' ;

Please let me know if the above query is correct or not.

Viewing all articles
Browse latest Browse all 13329

Trending Articles