الانتقال إلى المحتوى

الاخوة الاعزاء: شرح الInline Views


omar-alreyati

Recommended Posts

  • بعد 1 شهر...

Inline Views

•An inline view is a subquery with an alias (or correlation name) that you can use within a SQL statement.

•An inline view is created by placing a subquery in the FROM clause and giving that subquery an alias.

•An inline view is not a schema object.

•The subquery defines a data source that can be referenced in the main query

SELECT  a.last_name, a.salary, a.department_id, b. maxsal
FROM  employees a, 
(SELECT  department_id, max(salary) maxsal
FROM  employees
GROUP BY department_id) b
WHERE   a.department_id = b.department_id
AND    a.salary < b.maxsal;

رابط هذا التعليق
شارك

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية