1. Traditional layer by layer data, and Plsql as a separate unit to return to the client, reduce the query, reduce the network transmission of the round trip, funny2.pl/sql statement blocks are divided into two types: naming (subroutines, functions, packages that exist in the database, and later can be referenced by name), AnonymousDifference: A named statement block is stored in a database, referenced by a
PL/SQL language development Reference Manual: PL/SQL cursor
PL/SQL language development Reference Manual1. cursor)The cursor is the data extracted from the data table. It is stored in the memory as a temporary table. There is a da
1) classification of Sets
Oracle supports three types of collections:
Associative array (Index-by table)
Nested table)
Variable-length array (VARRAY)
One of their differences is that the Nested table and VARRY can be used either in PL/SQL or directly in the database, but the Associative array doesn't work, that is, associative array cannot be created separately using the create type statement. It can only b
Label:Control statements are fundamental to any language, to any programmer. Learn PL/SQL, only to realize the simplicity of Java grammar, it is not an era of things, of course, their positioning is not the same, not in their own longer than the short of others. --The 4th chapter begins--code 4.1 The simplest if statement uses example DECLARE v_count number (10): = 0; --Define the counter variable V_empno
For SQL optimization, you can use SQL tuning advisor to achieve automatic SQL optimization and adjustment. For PL/SQL code, there are both SQL code and PL/
v_job= ' salesman ' then UPDATE scott.emp SET sal=sal* (1+c_salesman) WHERE empno=empno1; elsif v_job= ' MANAGER ' then UPDATE scott.emp SET sal=sal* (1+c_manager) WHERE empno=empno1; elsif v_job= ' SR.CONT ' then UPDATE scott.emp SET sal=sal* (1+c_sr_cont) WHERE empno=empno1; END IF; --Displays completion information dbms_output. Put_Line (' already for employees ' | | empno1| | ' A successful raise! '); EXCEPTION-handling of PL/
PLSQLPL/SQL developer is an Oracle Database DeveloperProgramIntegrated Unit Development Environment (IDE). With PL/SQL developer, you can easily create the server part of your client/server application. So far, you can do the following in the worst case:• Use a text editor to Write Program units (processes, triggers, and so on ).• Use Oracle
Label:http://uule.iteye.com/blog/2061773 (source) Bulk Import Script : Open a Command Window > enter @ > It will let you select the file you want to import (you need to know the order of the imported files, Plsql will not automatically recognize this or write a script like LS) such as: @d:\svn\1.5 database Script \oracle\import2.sql http://blog.csdn.net/hbhgjiangkun/article/details/8208565 1, PL/
set of all the emp_id fields in the employee table being 3. When you need to operate the result set, you must complete three steps: Open the cursor, use the fetch statement to retrieve the data in the cursor, and close the cursor. Refer to the comments of the first code in this article to understand the three steps of the cursor operation.
V. Other Concepts
The concept in PL/SQL is very important. It is ma
The key to performance optimization is to find the right direction, for example, for a PL/SQL code, we think it is slow to execute, but in the end it needs a measurable tool to analyze, and we sometimes like to leave debug code in it, like using dbms_utility.get_ Time is spent on the execution of the statement, which can be cumbersome if the code is large.PL/SQL
Today, I am working on an OA report. I use a stored procedure to calculate some data. When doing a for xxx in xxxx loop end loop; loop, I never knew it was Mao. I can't catch the no_data_found exception in for any more. Once this no_data_found Oracle occurs, it automatically jumps out of the for loop, but I don't know what went wrong, that was depressing for an hour. Shit. Later I remembered that pl/SQL too
Today, I am working on an OA report. I use a stored procedure to calculate some data. When doing a for XXX in xxxx loop end loop; loop,
I never knew it was Mao. I cannot catch the no_data_found exception in for any more. Once this no_data_found occurs
Oracle will automatically Jump Out Of The for loop, but I don't know where the error occurred. It was a depressing hour. Shit.
Later I remembered that PL/SQL
total execution time of all units. When switching to the Unit module, the total execution time of the Unit module is
Unit -- unit name, that is, the stored procedure of execution, including the calling process and anonymous block.Line -- code line numberTotal time -- the execution time of the line of code (the color length represents the percentage of the execution time of the line of code and the maximum code execution time)Occurrences-number of executions of this rowText-the corresponding lin
fromEmpwhereEmpno=N; Dbms_output.put_line ('Employee name is:'||v_ename); Dbms_output.put_line ('Employee Sal is:'||v_sal); Exception whenNo_data_found ThenDbms_output.put_line ('Please input current number!'); End;6. With%type, ensure that the data type of the variable is consistent with the data type of the field in the table:Declarev_ename Emp.ename%type;v_sal emp.sal%type;begin SelectEname,sal intoV_ename,v_sal fromEmpwhereEmpno=N; Dbms_output.put_line ('Employee name is:'||v_ename); Dbms
(Han shunping) pl/SQL programming (2), shunping plI. pl/SQL advanced-control structurePl/SQL provides three conditional branch statements: if -- then, if -- then --- else, if --- then --- elsif --- else(1) simple condition judgment if-thenQuestion: When writing a process, yo
, which represents the result set of all the emp_id fields in the employee table being 3. When you need to operate the result set, you must complete three steps: Open the cursor, use the fetch statement to retrieve the data in the cursor, and close the cursor. Refer to the comments of the first code in this article to understand the three steps of the cursor operation.
V. Other Concepts
The concept in PL/SQL
first, what is PL/SQLPL/SQL is an extension of the language. The SQL language is a non-procedural language in which the user simply tells the computer what to do without needing to understand how the computer is doing it. For example, users want to query a table of a column of data, only need to input:selectcolunm_name from table_name where CONDITION; you can, wi
encapsulate a group of processes and functions with similar functions, similar to the concept of namespace in Object-Oriented.
A trigger is a special stored procedure. It is called only when a specific event occurs. It is mainly used for message notifications between multiple tables.
Vi. debugging environment
Currently, PL/SQL has many debugging environments. In addition to Oracle's self-contained de
PL/SQL is a block-structured language in which a PL/SQL program contains one or more logical blocks in which variables can be declared and variables must be declared before they are used. In addition to the normal execution procedures, PL/
PL/SQL statement beautification click No response. View the following prompts PL/SQL Beautifier could not parse text. I am this time due to the SQL statement syntax error.At the toolbar (if you don't have this button, right-click----Customize----Edit)PLD 6 or later has the a
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.