开发者

how to retrieve data from more than one table

开发者 https://www.devze.com 2023-02-25 09:15 出处:网络
Schema:- Part(pid, pname, price) Supplier(sid, sname,city) Part_Supplier(sid, pid) Q1) Get the supplier_id and the name for those suppliers who supply all parts.

Schema:-

Part(pid, pname, price) 

Supplier(sid, sname,city)

Part_Supplier(sid, pid)

Q1) Get the supplier_id and the name for those suppliers who supply all parts.

Q2) Get the part_id and name for those parts where the price of the part is greater than 3000 and is supplied by more than 3 suppli开发者_如何学编程ers.

Kindly help me with this as I am not able to figure this out. Any help will be highly appreciated.


As I mentioned in my comment, you shouldn't ask questions like this. You would easily be able to solve this problem if you did a basic SQL tutorial. Try this one: http://www.w3schools.com/sql/default.asp

Pay particular attention to SQL joins.

0

精彩评论

暂无评论...
验证码 换一张
取 消