Alibabacloud.com offers a wide variety of articles about sample stored procedure in oracle, easily find your sample stored procedure in oracle information here online.
1. Create a stored procedureSQL> Create or replace function get_sal3 (name varchar2)2 return number is3 v_sal number (6, 2 );4 begin5 select Sal into v_sal from EMP where upper (ename) = upper (name );6 RETURN v_sal;7 end;8/
The function has been created.
SQL> var salary numberSQL> Exec: Salary: = get_sal3 ('Scott ')
The PL/SQL process is successfully completed.
SQL> Print salary
Salary----------3000
2. Create a s
Calling a stored procedure through a JOB in oracle DB:
Create or replace procedure addage
Is
Begin
Insert into test_work_age (work_age_id, work_age_code, work_age_name, created_date)
Values (114, '20140901 ','');
End addage;
-----------------------
DECLARE
X number;
BEGIN
DBMS_JOB.SUBMIT
(Job => X -- job na
In order to test the stored procedure, I went around and did it. Here I will talk about what I thought when I received the task and started.
Method 1:
At first, I thought that I could use C # To directly call the stored procedure, and then use Loadrunner to call the dll of C # For testing. Later I found that I could no
I don't know if it can be used. I think there are only two types of providers, one is sqlschemaprovider and the other is adoxschemaprovider. After the template is written, an error is prompted during compilation,
The project cannot be found in the set of names or ordinal numbers.An error of type "comexception"Occured while attempting to execute this template. To enableJust-in-time debugging on this template set the "debug" attribute"True" in the "codetemplate" directive and add a "Debugger.
One, through the PLS block to call the stored procedure;DeclareP_dzno VARCHAR2 (50);P_vchtype VARCHAR2 (50);P_productclass VARCHAR2 (50);P_dptcode VARCHAR2 (50);Beginp_vchtype:= ' MP ';p_productclass:= ' 03 ';p_dptcode:= ' 206 ';PRODDATA.product_dz_proc.pd_getdzno (P_dzno,p_vchtype,p_productclass,p_dptcode);Dbms_output.put_line (P_dzno);EndThis article is from the "Small Li Guangzhi Blog" blog, please be su
One, the use of sys login,Second, Chan session_idFind stored procedure operationdata_imp by which sessionLocked and unable to compileSELECT * from dba_ddl_locks where name =upper (' Operationdata_imp ');third, Sid serial# detectedThus getting session_id, and then passingSelect t.sid,t.serial# from V$session twhere t.sid=session_id; Iv. based on getting Sid and Serial# killFinally, with Alter System kill se
Write the name of the stored procedure directly in the what value in PL/sql + "semicolon";beginsys.dbms_job.submit (Job=: Job, what= 'Del_ky_items;', Next_date=To_date ('24-06-2015 16:30:00','dd-mm-yyyy Hh24:mi:ss'), Interval= 'trunc (Sysdate,"'mi"') +1/24'); Commit;End;/If there are arguments, use two single quotation marks to enclose the string;are not required by the call statement;beginsys.dbms_job.subm
Scene:Wrote a stored procedure with a return parameter, which is normal on a different developer's machine. Other machines reported title errors. The depressing thing is that all callers are clients, there is no issue of version inconsistency that is said on the web.Analysis:Although the online post did not solve the problem at all, but still gave some Silk Road. Parameter value type problem. Also, I can al
) B. Area discrimination method (only for convex polygons) C. Angle and discriminant method (any polygon can be) For the generality of later storage procedures, the choice of use angle and discriminant method more meet the requirements.2.2 Principle of angle and discriminant method principle: make P={P1,P2,..., pn,p1} is a closed polygon with a vertex of Pi (xi,yi), i=1,2,..., N, and PT is a test point. PTPI is a vector that joins PT and Pi, and like represents the angle of the vector ptpi to pt
1. PL/SQL develper calls the Oracle client to connect to the Oracle server
2. Select My objects-packages-create package to create a package.
3. The packet is divided into two parts: the packet header, the packet body, and the packet body definition. Complete the specific operation!
4. Define a dynamic cursor (why do we need to define a dynamic cursor when it is not used ?)
....................
Today, a friend from a project team asked: how to call the stored procedure of Oracle in. NET and input it as an array.
Oracle's PL/SQL statements are very powerful. They support fixed-length arrays and variable-length arrays, and support any custom data types. By reading the ODP documentation, we found that Oracle ful
Use PHP to call the Oracle stored procedure. However, using stored procedures has at least two obvious advantages: speed and efficiency. It is faster to use stored procedures. In terms of efficiency, if an application requires a series of SQL operations at a time, but using
To reverse all the table structures in the Oracle database, there are partition tables and non-partition tables. The fields involved include number, data, timestamp, varchar2, and char. So only needle
To reverse all the table structures in the Oracle database, there are partition tables and non-partition tables. The fields involved include number, data, timestamp, varchar2, and char. So only needle
To
The stored procedure for returning a result set in Oracle, Unlike SQL Server, In the stored procedure, Oracle uses Select to return a result set. Instead, it uses Out-type parameters to return a result set. It is actually using RE
Software Environment:
1. Operating system: Windows Server
2. Database: Oracle 8i R2 (8.1.7) for NT Enterprise Edition
3, Installation path: c:oracle
Implementation method:
1,
D:>set Nls_lang=american_america. USACII7
Or
D:>set Nls_lang=american_america. We8iso8859p1
D:>set
Direct SET command to view environment variables
2,
Under D: Create the A.sql file, which reads as follows:
Create or Replace procedure
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.