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

How To Create a Stored Procedure
How To Create a Stored Procedure? - Oracle DBA FAQ - Creating Your Own PL/SQL Procedures and Functions A stored procedure is a procedure with a specified name and stored into the current database. If you want to create a stored procedure, you can use the CREATE PROCEDURE statement. The example scrip...
2007-04-26, 5246👍, 0💬

How To Assign a Table Row to a RECORD Variable
How To Assign a Table Row to a RECORD Variable? - Oracle DBA FAQ - Working with Database Objects in PL/SQL If you have a table, and want to assign a data row of that table to a RECORD variable, you need to define this RECORD variable to match the table column structure, then use the SELECT ... INTO ...
2007-04-27, 5216👍, 0💬

How To Retrieve Values from Data Fields in RECORD Variables
How To Retrieve Values from Data Fields in RECORD Variables? - Oracle DBA FAQ - Working with Database Objects in PL/SQL If a variable is a RECORD variable with data fields assigned values, you can retrieve those values out of its data fields by using fields names prefixed with variable name as "vari...
2007-04-27, 5211👍, 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, 5201👍, 0💬

What Is a RECORD in PL/SQL
What Is a RECORD in PL/SQL? - Oracle DBA FAQ - Working with Database Objects in PL/SQL RECORD is a composite data type in PL/SQL. It can have many fields representing data elements with different data types. Variables of RECORD type can be designed to hold data from database table rows. To use RECOR...
2007-04-27, 5200👍, 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, 5196👍, 0💬

What Is a Savepoint
What Is a Savepoint? Savepoint is a point within a particular transaction to which you may rollback without rolling back the entire transaction.
2007-04-15, 5188👍, 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, 5187👍, 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, 5186👍, 0💬

How To Execute a Stored Program Unit
How To Execute a Stored Program Unit? - Oracle DBA FAQ - Introduction to PL/SQL If you want to execute a stored program unit, you can use the EXECUTE statement. The example script below shows how to executes a stored program unit: SQL> set serveroutput on; SQL> CREATE PROCEDURE Hello AS 2 BEGIN 3 DB...
2007-04-25, 5186👍, 0💬

How To Pass Parameters to Procedures
How To Pass Parameters to Procedures? - Oracle DBA FAQ - Creating Your Own PL/SQL Procedures and Functions Store procedures or functions can take parameters. You need to define parameters while defining the procedure, and providing values to parameters while calling the procedure. The script below s...
2007-04-26, 5184👍, 0💬

What Is the Implicit Cursor
What Is the Implicit Cursor? - Oracle DBA FAQ - Working with Database Objects in PL/SQL 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 this statement. This implicit cursor is ...
2007-04-27, 5183👍, 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, 5176👍, 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, 5176👍, 0💬

How To Call a Stored Function with Parameters
How To Call a Stored Function with Parameters? - Oracle DBA FAQ - Creating Your Own PL/SQL Procedures and Functions You can define a function that takes parameters, provide values to those parameters when calling the function. Here is a good example of a function with a parameter: SQL> CREATE OR REP...
2007-04-25, 5176👍, 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, 5175👍, 0💬

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, 5167👍, 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, 5163👍, 0💬

What Is SQL*Plus
What Is SQL*Plus? SQL*Plus is an Oracle command line utility used for executing SQL and PL/SQL commands. The GUI version is called SQL Worksheet.
2007-04-15, 5157👍, 0💬

How To Insert a Record into a Table
How To Insert a Record into a Table? - Oracle DBA FAQ - Working with Database Objects in PL/SQL If you have a RECORD variable with data fields matching a table structure, you can insert a row to this table with this RECORD variable using the INSERT statement as shown in the example below: CREATE TAB...
2007-04-26, 5156👍, 0💬

What Are Character Functions
What Are Character Functions? Character Functions are INITCAP, UPPER, LOWER, SUBSTR and LENGTH. Additional functions are GREATEST and LEAST.
2007-04-15, 5145👍, 0💬

How To Assign Data of the Deleted Row to Variables
How To Assign Data of the Deleted Row to Variables? - Oracle DBA FAQ - Working with Database Objects in PL/SQL If a DELETE statement is deleting a single row, you can assign column values of the deleted row to variables by using the RETURNING clause, which an extension of DELETE statements for PL/SQ...
2007-04-27, 5141👍, 0💬

How To Define a Procedure inside Another Procedure
How To Define a Procedure inside Another Procedure? - Oracle DBA FAQ - Introduction to PL/SQL Define a procedure inside another procedure is supported by PL/SQL. The following tutorial script shows you an example: SQL> CREATE OR REPLACE PROCEDURE HR.DBA_WEEK AS 2 PROCEDURE DBA_TASK (day VARCHAR2) AS...
2007-04-26, 5141👍, 0💬

What Is Commit
What Is Commit? Commit is an event that attempts to make data in the database identical to the data in the form. It involves writing or posting data to the database and committing data to the database. Forms check the validity of the data in fields and records during a commit. Validity check are uni...
2007-04-15, 5140👍, 0💬

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