SQL and PL/SQL
Oracle SQL and PL/SQL | Queries | DML & DDL statements | Functions | Procedures | Triggers and Packages
لغة الإستعلام SQL
5,153 موضوعات في هذا القسم
-
assalam 3alikoum thanks to you after allahe I finished the code interfaces and it works, now I want to make a menu for navigating between interfaces but I do not know how to write PL / SQL code to compile the menu that I realized thanks in advance
-
السلام عليكم ورحمة الله وبركاته =================== من فضلكم كنت عاوز شرح ل Merge من خلال المثال التالي CREATE TABLE emp_copy_2 AS SELECT * FROM employees WHERE 1=2 ; CREATE OR REPLACE PROCEDURE pf_04_04 IS v_empno EMPLOYEES.EMPLOYEE_ID%TYPE := 100; BEGIN MERGE INTO emp_copy_2 c USING employees e ON (c.employee_id = v_empno) WHEN MATCHED THEN UPDATE SET c.first_name = e.first_name, c.last_name = e.last_name, c.email = e.email, c.phone_number = e.phone_number, c.hire_date = e.hire_date, c.job_id = e.job_id, c.salary = e.salary, c.commission_pct = e.commission_pct, c.manager_id = e.manager_id, c.department_id = e.department_id WHEN NOT MATCHED THEN INSERT (empl…
-
Have you heard about Merging Statement in oracle 10g? The Oracle9i database introduced the MERGE statement that allows you to merge rows from one table into another. For example, you might want to merge changes to products listed in one table into the products table. The store schema contains a table named product_changes that was created using the following CREATE TABLE statement in store_schema.sql: CREATE TABLE product_changes ( product_id INTEGER CONSTRAINT prod_changes_pk PRIMARY KEY, product_type_id INTEGER CONSTRAINT prod_changes_fk_product_types REFERENCES product_types(product_type_id), name VARCHAR2(30) NOT NULL, description VARCHAR2(50),…
-
بسم الله الرحمن الرحيم السلام عليكم و رحمة الله و بركاته ... وبعد أرجو من الاصدقاء الكرام ان يرشدوني الى طريقه فعاله لاستخدام Member Procedure Or Member Function in Object Type مثال CREATE TYPE person_typ AS OBJECT ( idno NUMBER, name VARCHAR2(30), phone VARCHAR2(20), MAP MEMBER FUNCTION get_idno RETURN NUMBER, MEMBER PROCEDURE display_details ( SELF IN OUT NOCOPY person_typ ) ); كيف يمكن لنا ان نقرأ النتائج من هذا ال الاجراء(MEMBER PROCEDURE) أرجو مساعدتكم بالسرعة اللمكنه مع و جود أمثله أخرى غير الذي ذكرته في رسالتي. بارك الله فيكم ,,,, و بالله التوفيق
-
Microsoft SQL Server 2000 بسم الله الرحمن الرحيم انا جايبلكم النهاردة ومن رفعى الشخصي روابط جديدة ومباشرة Microsoft SQL Server 2000 يارب يعجبكم وجارى رفع Microsoft SQL Server 2005 http://rapidshare.com/files/118049179/Microsoft_SQL_Server_2000.part1.rar http://rapidshare.com/files/118129069/Microsoft_SQL_Server_2000.part2.rar http://rapidshare.com/files/118184782/Microsoft_SQL_Server_2000.part3.rar http://rapidshare.com/files/118186204/Microsoft_SQL_Server_2000.part4.rar
-
يعطيكم العافية بحاجة اعرف كيف اشغل الموديم من خلال FORM انا بعرف اني بحاجة الى OCX ممكن المساعدة
-
salam alyoom borthers i hope all of fine i need explain about joins tables in sql wallah yagzeekom kair.
-
أخواني الأعزاء هذا والدرس الثالث عشر .... ch_13_more_package_concepts.pdf
-
-
-
اريد معرفة name of views مثل user_views user_constraints وهكذا select * from what
-
السلام عليكم هل يمكننى انشاء جدول في الأوراكل يبدأ ب (_) مثل: _Employees وشكراً
-
natural join للربط بين جدولين هل لابد ان يكون بين الجدولين علاقه مثل foriegin key, primary key وازاي بتشتغل مع الاعمده وهذا المثال: select department_id, department_name, location_id, city from departments natural join; ازاي ال dataبتتجمع مع بعضها فهل هناك رابط مثلا او علاقه بين الجدولين عشان يتم الربط بينهم وازاي الاعمده بتتركب مع بعض مع ان عدد الصفوف في كل جدول ممكن يكون مختلف ولكم جزيل الشكر......................
-
Create a package, which contains the following functions and procedures, in the HR account. 1. A function that has one input parameter of type NUMBER, and returns the square of its input. 2. A function that has three input parameters of type NUMBER, and returns the minimum of its three inputs. 3. A function that has one input parameter of type INTEGER. The function returns TRUE if its input is a prime number and FALSE if its input is not a prime number. A prime number (or a prime) is a natural number that has exactly two distinct natural number divisors: 1 and itself. Here is a list of the first twenty prime numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 4…
-
-
السلام عليكم هذا الكود عباره كيرسران متداخلان الكيرسور الخارجي يحضر اسماء الدوائر والداخلي يحضر اسماء الموظفين في كل دائره الفكره استخدام الكيرسر المتداخل ارجو من الله ان يستفيد من الفكره اخواني المبتدئين declarex varchar2(1000); begin for rec_1 in (select department_id,department_name from hr.departments) loop DBMS_OUTPUT.PUT_LINE( rec_1.department_name ); dBMS_OUTPUT.PUT_LINE( '------------------------------ '); for rec_2 in(select * from employees where employees.department_id=rec_1.department_id) loop x:=x||' '||rec_2.first_name||' '||rec_2.last_name||chr(13)||chr(10); end loop; DBMS_OUTPUT.PUT_LINE( x ); x:=''; dBMS_OUTPUT.PUT_LINE( '-----------------…
-
' DECODE(RCV.TRANSACTION_TYPE,'RECEIVE',RCV.CREATION_DATE,'RETURN TO VENDOR',NULL) ' RCV_DATE محتاج من فضلكوا اني اعمل Nesting Decode Statements للجملة السيلكت السابقة محتاج اعمل سيلكت تانية واديها alias اسمه receving_date ' محتواها ان لو RCV_DATE في الجملة الاولي طلع ب null يطلعلي ال sysdate ولو not null يطلع RCV_DATE في الجملة الاولي
-
السلام عليكم ورحمة الله أريد عمل أو تنفيذ الكود التالي:- Select Avg(sal) from emp group by deptno; الان اشتي اطلع اكبر معدل من النتائج الظاهرة يعني اشتي اكبر معدل الراتب في الرواتب نفذت الكود التالي وطلع خطا select max(avg(sal)) from emp group by dept; لكن للاسف خطأ الرجاء المساعدة ثانيا هل كتاب Oracle 10G complete Reference study guide مناسب للدراسة لالاوراكل مشكورين دام لنا هذا المنتدى
-
السلام عليكم ورحمة الله وبركاته, المشكلة عند استدعاء ال ID لقيمة من جدول لا يحضرها والسبب ان القيمة مأخوذة من اكسل وفي هذه الاكسل يوجد enter يعني ينزل سطر لذلك لا يراه وبالتالي لا يحضر ال ID. هل يوجد فنكشن او طريقة لتجنب ال enter (new line) ارجو المساعدة ولكم جزيل الشكر
-
السلام عليكم اخواني الاعضاء لوسمحتو انا عملت new text item وبدي احط فيه اسم الموظف واسم الموظف موجود في جدول تاني بدي الكود المناسب اللي اذا ادخلت رقم الموظف يروح يجبلي اسم الموظف اللي بنفس الرقم من جدول الموظفين الاساسي ويظهرلي على text item اللي سويتو جديد صارلي فترة ماستخدمة الاوراكل وناسي فيه بعض الاشياء ولكم جزيل الشكر
-
من فضلك كنت عاوز شرح مفصل عن Non-Equijoins ولكم جزيل الشكر................................................. لا اله الا الله
-
السلام عليكم ورحمة الله وبركاته أسعد الله أيامكم بكل خير وأمن وإيمان .... في حضوري لأحد اللقاءات الشهرية لمجموعة من المهتمين في مجال التطوير والبرمجة, تحدث أحد الرواد في مجال خدمات الحوسبة السحابية بالمملكة العربية السعودية عن مجموعة من المواضيع ثم تطرق لنقطة اعتبرها زبدة هذا الموضوع قائلا " NoSQL ستذهب بكل الشركات التي تعتمد على SQL بشكل رئيسي مثل Oracle " انتهى كلامه.. وعلل السبب في عدم قابلية هيكلة SQL للتوسع كل ما توسعت الخدمة لدى المزود. يوجد دعم لـ NoSQL في أوراكل ولكن تعتبر ضعيفة في هذا المجال حيث تأخرها في اقتحام المجال ودعمها ل SQL لكثرة عملائها في هذا المجال. مناقشة : أنا أرى أن NoSQL سيقتحم إن لم يكن اقتحم مجال قواعد البيانات . نظرة أخرى عادلة…
-
DATA DEFINITION LANGUAGE: This language is used to define the structure of the object(table) and allows the user to make changes on the structure. 1)create 2)alter --> add modify drop 3)drop sql > create table <tablename>(colname datatype(size),colname datatype(size),------------); note: 1)In a user the table name should be unique 2)table name should start with alphabetic character. 3)No special characters and space is allowed in the table name other than ($,_) 4)The si…
-
What part of a database trigger determines the number of times the trigger body executes A. Trigger type B. Trigger body C. Trigger event D. Trigger timing
-
تحياتي tofeee -- ______________________________________________________________________ -- | | -- | Number To Words Conversion Function | -- |____________________________________________________________________| -- -- FILE: To_Words.plf -- LOCATION: -- TITLE: Number To Words Conversion Function -- TYPE: ORACLE PL/SQL Stored Function -- VERSION: 1.0 -- CREATED: August 12, 1997 -- AUTHOR: Solomon Yakobson -- WARNING: -- DESCRIPTION: Number To Words Conversion Function converts into words -- any number with whole and fractional parts not exceeding -- 38 digits each. For converting dollar amounts fractional -- part must not exceed 2 digits. -- Funct…