الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

شرح Plsql

Featured Replies

بتاريخ:

بسم الله الرحمن الرحيم

سوف ابدا سلسله شرح لل plsql
الدرس الاول

PL/SQL STRUCTURE

-	Block Structure

Pl SQL program are divided up into structures know as blocks, with each block containing Pl SQL and SQL statements 
The typical PL SQL block has the following structure.

Declare         -- optional
           Declaration_statements – [ variables , constant , user defined exceptions , cursors ] 

Begin -- mandatory
          [sql statements , PL SQL statements ]

Exception    -- optional    
               [ Actions to perform when errors occur ]

End ;           -- mandatory

Every statement is terminated by a semicolon ; And block is terminated using the END keyword

-	Type of variables 

PL SQL Variables:

Scalar 
Such as [ number , varchar2 , Boolean , date ]

Composite 
Record that contain variables such as [ number , date ]

Reference

Large objects lob

Non-PL SQL Variables:

[ Bind variables , Host variables ]

-	Identifier variables in PL SQL

Identifier ( constant ) data type ( not null ) [ : = / default expression ] Or Using  % type attributes

-	Block Structure Types:

Anonymous block  -- Dose not have a name 
Subprograms 
Such as [ procedure , Function , trigger ]

-	Anonymous block examples 

1-	Display and Retrieve data
 
Select  Column Names
Into [ variables , records name ]
From table name
Where [ condition ]

Example:    

    Declare 
               V_ID              emp.empno%type;
               V_Name      emp.ename%type;
               V_Sal             emp.sal%type;
   Begin Select  Empno,Ename,Sal
   Into v_Id,V_Name,V_sal From       EMP
   Where Empno=7788;
   dbms_output.put_line(v_id||' ' ||v_Name|| ' ' ||To_Char(V_Sal));
   End;

2-	Insert case 

Begin Insert Into Emp ( empno , Ename)
Values ( 200,'islam');
End; Or Declare 
            V_empno     emp.empno%type:=&no;
            V_ename    emp.ename%type:='&name';
Begin Insert Into Emp ( empno , Ename)
Values (v_empno,V_ename);
End;

3-	Update case

Declare 
           V_sal_increase    emp.sal%type:=&sal;
Begin Update emp
Set sal=sal+v_sal_increase
Where empno=7788;
End;

4-	Delete case 

Declare 
         V_id    emp.empno%type:=&no;
Begin Delete from emp Where empno=v_id;
End;

  • بعد 2 أسابيع...
بتاريخ:

بارك الله فيك على هذا الجهد الطيب...

  • بعد 1 شهر...
بتاريخ:

يعطيك العافيه

بتاريخ:

مشكور يا أخي على المعلومات القيمة
وإلى الأمام يا أخي .........

  • بعد 1 شهر...
بتاريخ:

مشكور يا اخونا وننتظر الدرس الثاني

  • بعد 3 أسابيع...
بتاريخ:

جزاك الله خيرا ........................
جزاك الله خيرا ........................
جزاك الله خيرا ........................
جزاك الله خيرا ........................
جزاك الله خيرا ........................
جزاك الله خيرا ........................

بتاريخ:

أخي الكريم ، آسف جداً علي التأخير ، وألف ألف مبروك

فعلاً من صبر علي شيء وفقة اله عز وجل

بتاريخ:

ربنا يبارك فيك وننتظر المزيد

  • بعد 8 شهور...
بتاريخ:

الاخ Fabled Warrior مشكور على جهودك القيمة ولي طلب اذا ممكن تعطينا توضيح بالعربي لكل برنامج اي شرح وتوضيح الفكرة التي يقوم بها

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

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

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

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

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

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.