PL/SQL cursor usage
Use of cursors
① Cursor ConceptTo process SQL statements, Oracle must allocate a region called context area to process required information,This includes the number of rows to be processed, a pointer to the expression after the statement is analyzed, and the queried active set ).A cursor is a handle
Basic PL/SQL entry cursor
PL/SQL: a programming Language combined with a Structured Language (Structured Query Language). It is an extension of SQL and supports multiple data types, such as large objects and Collection types, you can use control statements such as conditions
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_
PL/SQL script language value assignment statement syntax table and record comply with the type usage, select the statement if else usage anonymous block (1), assign value statement syntax PL/SQL values use: = "=" some rules need to be observed in the comparison operator value assignment statement: the character type mu
The DBMS_HPROF package is an oracle11g tool. It is a combination of DBMS_PROFILER and DBMS_TRACE. Here is a simple demonstration of how to use the DBMS_HPROF package to analyze the stored procedure information.
The DBMS_HPROF package is a tool that appears in oracle 11 GB. It is a combination of DBMS_PROFILER and DBMS_TRACE. Here is a simple demonstration of how to use the DBMS_HPROF package to analyze the stored procedure information.
The DBMS_HPROF package is a tool for Oracle 11 GB and i
PL/SQL cursor usage, plsql cursor usageZookeeper
Use of cursors
① Cursor ConceptTo process SQL statements, ORACLE must allocate a region called context area to process required information,This includes the number of rows to be processed, a pointer to the expression after the statement is analyzed, and the queried acti
what is PL/SQL? PL/SQL (procedural language/sql) is an extension of Oracle's on-the-loop, which allows you to define constants and variables, allows you to use conditional and circular statements, and allows you to use exceptions to handle various errors. This makes it a ver
Label:After installing Oracle (64-bit), PL/SQL developer, execute PL/SQL occurs for example the following error:On the Internet, my PL/SQL developer is incompatible with Oracle, that is, PL
directly used after decompression, if there are problems can be Baidu.
The second step is to create a new user with SQL Plus
First find SQL Plus in the Start menu, if you can't find it.
Turning on SQL Plus will remind you to enter your username and password, and enter system and corresponding password (this is especially emphasized in the previous step).
Aft
Tags: tools user detail ACL Oar data document Tin NTS1. How to check procedure exist: Sql> Conn oper/oper123Connected.sql> desc Dbms_lock;PROCEDURE Allocate_uniqueArgument Name Type in/out Default?------------------------------ ----------------------- ------ --------Lockname VARCHAR2 inLockhandle VARCHAR2 outExpiration_secs number in DEFAULTFUNCTION CONVERT RETURNS Numb
Four simple guidelines to improve the number and quality of Pl/sql code
I've been writing Pl/sql code since 1990. That means I've written tens of thousands of of lines of software code, but I'm sure most of the code is very clumsy and difficult to maintain.
Luckily, I find
oracle| Data | Database in the database operation is often the case occurs, due to a momentary negligence and mistakenly deleted or mistakenly changed some important data, in addition to some important tasks need to run periodically. Obviously, the first kind of problem is mainly data backup and recovery, the latter is mainly the task scheduling of the system. In this paper, we will give a solution to these two types of problems from the perspective of application development.
A Technical Basics
First_exception ThenWhen Second_exception ThenWhen OTHERS and END;Exception handling can be arranged in a random order, but the others must be placed at the end.③ pre-defined exception handlingFor such exception processing, only in the PL/SQL block exception handling section, directly refer to the corresponding exception name, and the completion of the corresponding exception error processing can be.[Defin
/SQL and statementsEND IF;OrIF PL/SQL and statementsELSEOther statementsEND IF;The complex form of the if statement is: if pl/sql and SQL statements elsif other statements elsif other statements ... else oth
debugging stored procedures in PLSQL, of course, also applies to functions.The software version and environment used in this article:Server: Oracle 8.1.2 for Solaris 8PL/SQL developer 4.5PreparationsBefore you begin, assume that you have installed the Oracle Database Service, created a database, and configured a listener to allow the client to connect; at the same time, you have a development client with a local net service name set, and you have ins
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.