< 1 2 3 4 5 6 > >>   Sort: Rank

What Is NULL in PL/SQL
What Is NULL in PL/SQL? - Oracle DBA FAQ - Understanding PL/SQL Language Basics NULL is a reserved key word and it stands for two things in PL/SQL: NULL is an executable statement, and means doing nothing. NULL is a data balue, and means no value. The following sample script shows you examples of us...
2007-04-29, 4792👍, 0💬

How To Test NULL Values
How To Test NULL Values? - Oracle DBA FAQ - Understanding PL/SQL Language Basics There ate two special comparison operators you can use on NULL values: "variable IS NULL" - Returns TRUE if the variable value is NULL. "variable IS NOT NULL" - Return TRUE if the variable value is not NULL. The followi...
2007-04-29, 5681👍, 0💬

What Is a Cursor
What Is a Cursor? - Oracle DBA FAQ - Working with Cursors in PL/SQL A cursor looks like a variable, but it is not a variable. A cursor looks like a procedure, but it is not a procedure. A cursor is a cursor. It is a logical representation of a resource connects to a set of data rows related to a DML...
2007-04-29, 4853👍, 0💬

How Many Types of Cursors Supported in PL/SQL
How Many Types of Cursors Supported in PL/SQL? - Oracle DBA FAQ - Working with Cursors in PL/SQL PL/SQL supports two types of cursors: The implicit cursor - A single default cursor that automatically connects to the last DML statement executed. Explicit cursors - User defined cursors with specific D...
2007-04-29, 5079👍, 0💬

What Is the Implicit Cursor
What Is the Implicit Cursor? - Oracle DBA FAQ - Working with Cursors in PL/SQL There is only one implicitly cursor in a session. The implicit cursor is the cursor automatically defined by PL/SQL for you. Whenever a SQL statement is executed, this cursor will be assigned to represent the execution of...
2007-04-29, 4679👍, 0💬

How To Loop through Data Rows in the Implicit Curosr
How To Loop through Data Rows in the Implicit Curosr? - Oracle DBA FAQ - Working with Cursors in PL/SQL You use the FOR ... IN ... LOOP statement to loop through data rows in the implicit cursor as the following syntax: FOR row IN dml_statement LOOP (statement block with row.field) END LOOP; Here "r...
2007-04-29, 4820👍, 0💬

How To Use Attributes of the Implicit Cursor
How To Use Attributes of the Implicit Cursor? - Oracle DBA FAQ - Working with Cursors in PL/SQL Right after executing a DML statement, you retrieve any attribute of the implicit cursor by using SQL%attribute_name, as shown in the following tutorial exercise: CREATE TABLE student (id NUMBER(5) PRIMAR...
2007-04-29, 4793👍, 0💬

How To Open and Close an Explicit Cursor
How To Open and Close an Explicit Cursor? - Oracle DBA FAQ - Working with Cursors in PL/SQL An existing cursor can be opened or closed by the OPEN or CLOSE statement as shown in the following sample script: DECLARE CURSOR c_list IS SELECT * FROM countries; CURSOR t_list IS SELECT * FROM employees WH...
2007-04-29, 4665👍, 0💬

How To Define an Explicit Cursor
How To Define an Explicit Cursor? - Oracle DBA FAQ - Working with Cursors in PL/SQL An explicit cursor must be defined in the declaration part of a procedure or function with the CURSOR ... IS statement as shown in the following sample script: DECLARE CURSOR c_list IS SELECT * FROM countries; CURSOR...
2007-04-29, 4765👍, 0💬

How To Retrieve Data from an Cursor to a RECORD
How To Retrieve Data from an Cursor to a RECORD? - Oracle DBA FAQ - Working with Cursors in PL/SQL If you have a cursor opened ready to use, you can also use the FETCH statement to retrieve data from the cursor into a RECORD variable as shown in the tutorial exercise below: CREATE OR REPLACE PROCEDU...
2007-04-29, 4731👍, 0💬

How To Retrieve Data from an Explicit Cursor
How To Retrieve Data from an Explicit Cursor? - Oracle DBA FAQ - Working with Cursors in PL/SQL If you have a cursor opened ready to use, you can use the FETCH ... INTO statement to retrieve data from the cursor into variables. FETCH statement will: Retrieve all the fields from the row pointed by th...
2007-04-29, 4547👍, 0💬

How To Use FETCH Statement in a Loop
How To Use FETCH Statement in a Loop? - Oracle DBA FAQ - Working with Cursors in PL/SQL If you have a cursor opened ready to use, you can also use the FETCH statement in a loop to retrieve data from the cursor more efficiently. But you need to remember to use an EXIT statement break the loop when th...
2007-04-29, 4763👍, 0💬

How To Use an Explicit Cursor without OPEN Statements
How To Use an Explicit Cursor without OPEN Statements? - Oracle DBA FAQ - Working with Cursors in PL/SQL If you want to open a cursor and loop through its data rows in quick way, you can use the FOR ... IN ... LOOP statement in the same way as the implicit cursor. The following tutorial exercise giv...
2007-04-29, 4823👍, 0💬

Can Multiple Cursors Being Opened at the Same Time
Can Multiple Cursors Being Opened at the Same Time? - Oracle DBA FAQ - Working with Cursors in PL/SQL Yes, multiple cursors can be opened at the same time. See the following example: CREATE OR REPLACE PROCEDURE FYI_CENTER AS CURSOR emp_cur IS SELECT * FROM employees; emp_rec employees%ROWTYPE; CURSO...
2007-04-28, 7401👍, 0💬

How To Pass a Parameter to a Cursor
How To Pass a Parameter to a Cursor? - Oracle DBA FAQ - Working with Cursors in PL/SQL When you define a cursor, you can set a formal parameter in the cursor. The formal parameter will be replaced by an actual parameter in the OPEN cursor statement. Here is a good example of a cursor with two parame...
2007-04-28, 5130👍, 0💬

How To Define a Cursor Variable
How To Define a Cursor Variable? - Oracle DBA FAQ - Working with Cursors in PL/SQL To define cursor variable, you must decide which REF CURSOR data type to use. There are 3 ways to select a REF CURSOR data type: Define your own specific REF CURSOR types using the TYPE ... RETURN statement. Define yo...
2007-04-28, 4806👍, 0💬

What Is a Cursor Variable
What Is a Cursor Variable? - Oracle DBA FAQ - Working with Cursors in PL/SQL A cursor variable is a variable of a specific REF CURSOR data type, which is a pointer to a data structure resource connects to query statement result, similar to the CURSOR data type.. The advantage of using cursor variabl...
2007-04-28, 5075👍, 0💬

How To Loop through a Cursor Variable
How To Loop through a Cursor Variable? - Oracle DBA FAQ - Working with Cursors in PL/SQL Once a cursor variable is opened with a query statement, it will have the same attributes as a normal cursor and it can be used in the same way a normal cursor too. The following sample script shows you how to l...
2007-04-28, 4897👍, 0💬

How To Open a Cursor Variable
How To Open a Cursor Variable? - Oracle DBA FAQ - Working with Cursors in PL/SQL A cursor variable must be opened with a specific query statement before you can fetch data fields from its data rows. To open a cursor variable, you can use the OPEN ... FOR statement as shown in the following tutorial ...
2007-04-28, 4842👍, 0💬

Why Cursor Variables Are Easier to Use than Cursors
Why Cursor Variables Are Easier to Use than Cursors? - Oracle DBA FAQ - Working with Cursors in PL/SQL Cursor variables are easier to use than cursors because: Cursor variables are easier to define. No need to give a specific query statement. Cursor variables are easier to open. You can specify the ...
2007-04-28, 4756👍, 0💬

How To Pass a Cursor Variable to a Procedure
How To Pass a Cursor Variable to a Procedure? - Oracle DBA FAQ - Working with Cursors in PL/SQL A cursor variable can be passed into a procedure like a normal variable. The sample script below gives you a good example: CREATE OR REPLACE PROCEDURE FYI_CENTER AS sys_cur SYS_REFCURSOR; PROCEDURE emp_pr...
2007-04-28, 4757👍, 0💬

Can DDL Statements Be Used in PL/SQL
Can DDL Statements Be Used in PL/SQL? - Oracle DBA FAQ - Working with Database Objects in PL/SQL No, you can not run any DDL statements is PL/SQL directly. If you try to use the DROP TABLE statement inside PL/SQL, you will get a compilation error as shown below: (Connect to XE with SQL*Plus) BEGIN D...
2007-04-28, 4830👍, 0💬

Can DML Statements Be Used in PL/SQL
Can DML Statements Be Used in PL/SQL? - Oracle DBA FAQ - Working with Database Objects in PL/SQL Yes, you can run almost any DML statements in PL/SQL directly. To manipulate Oracle database data you can include INSERT, UPDATE, and DELETE statements, directly in PL/SQL programs, without any special n...
2007-04-28, 4506👍, 0💬

What Happens If Variable Names Collide with Table/Column Names
What Happens If Variable Names Collide with Table/Column Names? - Oracle DBA FAQ - Working with Database Objects in PL/SQL When a variable name collides with a column name, PL/SQL will use it as the variable if it is used where variable is allowed; It will be used as the column, if it is used where ...
2007-04-28, 4871👍, 0💬

< 1 2 3 4 5 6 > >>   Sort: Rank