بتاريخ: 30 أبريل 201114 سنة comment_211281 Write a PL/SQL procedure or function that will accept one or more inputparameter. The procedure or function will then do any SQL operation.Write a PL/SQL block that will call the procedure or function????? تقديم بلاغ
بتاريخ: 13 سبتمبر 201114 سنة comment_215679 First Procedure Simple program Have One Or More Parameter Also return one or more values Parameter Type IN OUT IN OUT Procuder Body -------------------- Create Or Replace Procedure Procedure_Name ( Parameter_1 , ..., Parameter_N) IS/AS Begin operaitions End Proceduer_Name ; Example Create Or Replace Procedure Emp_data_query ( E_ID IN employee.empid%type , E_NAME OUT employee.empName%type ) IS Begin select empName into E_NAME from employee where empid = E_ID ; END EMP_DATA_QUERY ; To Run This Write Simlpe PL Example begin Emp_data_query(empids) end ; Second Function Simple Program Have One Or More Parameters Return One Value ONLY or Not return any Value ( Void Function) We Common used it On Select Or Update Statment Function Body -------------------- Create Or Replace Function Function_Name ( Parameter_1 , ..., Parameter_N) Return Datatype IS/AS Begin operaitions End Function_Name ; مثال Create Or Replace Function Emp_sal_Tax ( E_SAL IN employee.Salary%type ) Return Number ; IS Begin Return ( E_SAL * 10 % ); END Emp_sal_Tax ; To use it select emp_id , emp_Name , emp_sal , Emp_sal_Tax(emp_sal) as Tax From Employee where emp_id = 102 ; i hope that i have given a good help for more help call me 0102074787 تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.