was a problem here, I gave Scott that dbms_pipe permission, forgot to enter the user, directly with the SYS run, and then quitUsing Scott to run is not, error, and then should be used in the time of SYS to create a pipeline, Scott does not use this. Then I changed another name.But why can't I quit ...DECLARE pipename VARCHAR2 (n): = ' signaler1 '; Result INTEGER: = Dbms_pipe.create_pipe (Pipename); BEGIN dbms_pipe.pack_message (' Stop '); end;/This is the one that stopped, but it's not good. Lo
later found that it is not at all, and that the error Dup_val_on_index, his book is also wrong.Here is an anonymous blockDate.sqlDECLARE l_date date;BEGIN l_date: = SYSDATE-5; Dbms_output. Put_Line (l_date); end;/I still don't know how to call that process, although I tried it before, but I didn't remember it.I'm going to try to write a call on my own, I write a process for printing time, and then call it in an anonymous block.Get_date.sqlCREATE OR REPLACE PROCEDURE get_date (num_in in number)
match.Then I wrote an example:CREATE OR REPLACE PROCEDURE give_bonus (emp_no_id in number, bonus in number) AUTHID Current_userisbegin dbms_output.Put_Line (emp_no_id); Dbms_output. Put_Line (bonus); END give_bonus;/This is followed by the use of the case expressiondeclarel_salnumber; beginselectsalintol_salfromemp whereempno=7839;dbms_output. Put_Line (l_sal); give_bonus (7839, CASE whenl_sal>=1000andl_salSo it's actually an expression, and then the expression gets a result.After the introduct
Tags: array rar organization Throw exception build log job schedule exec expressionThis week's book is the Ultimate guide to Oracle's C PL (SQL) programming, published by the mechanical industry press, Sun Fingdong, Wang Yu, Guo Xiaohui.
Content Introduction:
The ultimate guide to Oracle 12c
the return value VAR salary number; exec:salary:=get_sal (7369); PRINT salary; Mode two: Call function directly in SQL statement SELECT get_sal (7369) from DUAL; way three: Use Dbms_output call function SET serveroutput on EXEC Dbms_output.put_line (' Wages are: ' | | get_sal (7369));Delete functions drop function get_sal;
Create a PackageA package is a PL/
Label:Original: http://blog.csdn.net/kimsoft/article/details/8751267 Operating system: Windows 7 64-bit flagship requirements, install PL/SQL developer for development First, download the official Oracle Lite Green Edition Http://www.oracle.com/technetwork/topics/winsoft-085727.html Special note To download the 32-bit
programs more robustOf course, in addition to these advantages, PL/SQL has other advantages, such as better performance, portability and compatibility, maintainability, ease of use and speed, and the ability to define identifiers to increase program readability.Iii. PL/SQL blocksThe
Oracle pl/SQL programming the use of SQL statements select must have a return record, do not report an error saying that no data is found and must have an into select statement to return one and only one record cannot be written as where deptno = 10 because multiple records
Oracle is a large database with a C/SClient/Server structure. It is mainly used in the 4GLSQL language and has the advantages of being powerful, simple, and easy to learn. The working process of the C/S structure is: when the client c end) inputs and sends an SQL statement, it will be sent to the server S end through the network ), the result is analyzed and executed, and then returned to the client through
variable, or function2.1. Examples of scalar definitionsDefines a variable-length stringV_name VARCHAR2 (10);Defines a decimal range -9999.99~9999.99V_sal Number (6,2)Define a decimal and give the initial value 6.6 Note:: = is a variable assignment number for PL/SQLV_num Number (6.2): =6.6Define data for a date typeV_date date;Set a Boolean variable that cannot be null and the initial value is false;V_bool Boolean NOT null Defalut false;Note: The use
Pl/SQL programming data type in Oracle pl Programming Data Type: www.2cto.com 1. scalar type (scalar) 2. composite 3. reference Type 4.lob( large object) -------------------------------------------------------------- case 1 of def
anchored declaration Data types for Orache VARCHAR2: Stores variable-length characters. Parameters must be set to the maximum length of the character data, up to 32767. Do not use constants or variables to make the maximum length: you must use the literal value of the integer type. Database column has a maximum width of 4000 bytes CHAR: Stores the field characters, parameters are optional. Do not use constants or variables to make the maximum length: you must use the literal value of the intege
Tags: make line home strong close End Statement stat data type Zha
The native installation of Oracle, the default is the boot service, boot time is too slow, shut down, need to open the service:
OracledbconsoleorclOracleoradb10g_home1isql*plusOracleoradb10g_home1tnslistenerORACLESERVICEORCL This behind the ORCL is the database name, the official term is called the database SID2. Open PL
rounding), and put the result into a variable: v_ your initials (for example: V_zs), and then output to the screen.2. Create and execute a PL/SQL program block, query the maximum salary in the EMP table of the Scott scheme, and put it into a variable: v_ your initials (for example: V_zs) and then display it on the screen.3. Create and execute a PL/
The case of PL/SQL programming specification
As in SQL, Pl/sql is case-insensitive. Its general guidelines are as follows:
Keywords (BEGIN, EXCEPTION, end, IF THEN else,loop, End LOOP), data type (VARCHAR2, number), internal fun
The plsql block that only contains the execution part setserveroutputon -- open the output option begindbms_output.put_line (
Only pl/SQL block including execution part set serveroutput on -- open the output option begin dbms_output.put_line (
Pl/SQL block that only contains the execution part
Set serveroutput
Oracle Database Programming: Develop PL/SQL subprograms and packages to develop PL/SQL subprograms and packages: subprograms: Compile rather than run at run time. Only calls can produce results. Subprograms are divided into store
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.