الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

كيفية عرض بيانات الـinner query في الـouter query ...

بدأه hamany-pirlo في 18 نوفمبر 2011 · 0 رد · 613 مشاهدة · في قواعد بيانات Oracle
مشاركة: واتساب X فيسبوك تيليجرام
#1

السلام عليكم ...

هل هناك طريقة لعرض بيانات الـ inner query في النتيجة النهائية للـ outer query ؟

حيث ما أريد عمله هو

select cage.width, cage.length, cage.height, feed.food_type, medication.medicine, medication.type
from   birds
where  exists
	( select *
	  from cage
	  where birds.home like '%Australia%' and birds.cage_code=cage.cage_code	
	)
      and exists
	( select *
	  from feed
	  where birds.home like '%Australia%' and birds.species=feed.species and birds.type=feed.type
	)
      and exists
	( select * 
	  from infected
	  where birds.home like '%Australia%' and 
	        birds.species=infected.species and 
                birds.type=infected.type and
		(infected.illness, infected.cause) in ( select medication.illness, medication.cause
							from medication
						      )
	);

و هذه هي قاعدة البيانات الخاصة بي

screenshot1.png

و هذا هو السؤال الذي أحاول حله

screenshot2.png

علما بأن الـ underlined attributes هم الـ primary key لذلك الجدول.

تم تعديل هذه المشاركة بواسطة hamany-pirlo في 18 نوفمبر 2011 في 15:40

Program every day for 20 years and you will become a good programmer. Program every day for 10 years and study algorithms on the side and you will become a great programmer !

على الأقل هذا اللي سمعته ...

مواضيع مشابهة