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

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, 4776👍, 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, 4774👍, 0💬

What Are Data Types Limitations
What Are Data Types Limitations? Max. columns in a table is 255. Max. Char size is 255, Long is 64K and Number is 38 digits. Cannot Query on a long column. Char, Varchar2 Max. size is 2000 and default is 1 byte. Number(p,s) p is precision range 1 to 38, s is scale -84 to 127. Long Character data of ...
2007-04-15, 4773👍, 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, 4770👍, 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, 4765👍, 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, 4758👍, 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, 4758👍, 0💬

When to Use SELECT INTO Statements
When to Use SELECT INTO Statements? The SELECT INTO Statement is most often used to create backup copies of tables or for archiving records. SELECT column_name(s) INTO newtable [IN externaldatabase] FROM source SELECT column_name(s) INTO newtable [IN externaldatabase] FROM source WHERE column_name o...
2007-04-15, 4756👍, 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, 4748👍, 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, 4745👍, 0💬

What Is a Transaction
What Is a Transaction? Transaction is defined as all changes made to the database between successive commits.
2007-04-15, 4743👍, 0💬

Operators used in SELECT statements
Name some operators used in SELECT statements = Equal or != Not equal > Greater than = Greater than or equal <= Less than or equal BETWEEN Between an inclusive range LIKE Search for a pattern
2007-04-15, 4741👍, 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, 4737👍, 0💬

How To Define a Specific RECORD Type
How To Define a Specific RECORD Type? - Oracle DBA FAQ - Working with Database Objects in PL/SQL If you want to define a specific RECORD type, you need to use the TYPE ... IS RECORD statement in the declaration part of any procedure or function. The following example script defines a RECORD type cal...
2007-04-27, 4732👍, 0💬

How To Create a Stored Program Unit
How To Create a Stored Program Unit? - Oracle DBA FAQ - Introduction to PL/SQL If you want to create a stored program unit, you can use the CREATE PROCEDURE or FUNTION statement. The example script below creates a stored program unit: SQL> set serveroutput on; SQL> CREATE PROCEDURE Hello AS 2 BEGIN ...
2007-04-25, 4724👍, 0💬

What Is PL/SQL
What Is PL/SQL? - Oracle DBA FAQ - Introduction to PL/SQL PL/SQL is a modern, block-structured programming language. It provides several features that make developing powerful database applications very convenient. For example, PL/SQL provides procedural constructs, such as loops and conditional sta...
2007-04-25, 4720👍, 0💬

How Many Anonymous Blocks Can Be Defined
How Many Anonymous Blocks Can Be Defined? - Oracle DBA FAQ - Introduction to PL/SQL An anonymous block is stored in the user's current session without any name. So you can only define one anonymous block at any time. If you define another anonymous block, the new block will replace the previously de...
2007-04-25, 4717👍, 0💬

How To Define a Variable to Match a Table Column Data Type
How To Define a Variable to Match a Table Column Data Type? - Oracle DBA FAQ - Working with Database Objects in PL/SQL If you have a table, and want to define some variables to have exactly the same data types as some columns in that table, you can use table_name.column_name%TYPE as data types to de...
2007-04-26, 4714👍, 0💬

Sample SELECT Statements
Write some simple SELECT Statements SELECT column_name(s) FROM table_name SELECT DISTINCT column_name(s) FROM table_name SELECT column FROM table WHERE column operator value SELECT column FROM table WHERE column LIKE pattern SELECT column,SUM(column) FROM table GROUP BY column SELECT column,SUM(colu...
2007-04-15, 4714👍, 0💬

That Is a Correlated Subquery
That Is a Correlated Subquery? Correlated Subquery is a subquery that is evaluated once for each row processed by the parent statement. Parent statement can be Select, Update or Delete. Use Correlated Subquery to answer multipart questions whose answer depends on the value in each row processed by p...
2007-04-15, 4714👍, 0💬

What Are the Types PL/SQL Code Blocks
What Are the Types PL/SQL Code Blocks? - Oracle DBA FAQ - Introduction to PL/SQL There are 3 types of PL/SQL code blocks: Anonymous Block - A block of codes with no name. It may contain a declaration part, an execution part, and exception handlers. Stored Program Unit - A block of codes with a name....
2007-04-25, 4694👍, 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, 4683👍, 0💬

Can Variables Be Used in SQL Statements
Can Variables Be Used in SQL Statements? - Oracle DBA FAQ - Working with Database Objects in PL/SQL Yes, you can use variables in SQL statements as part of any expressions. The tutorial script provides you some good examples: (Connect to XE with SQL*Plus) CREATE TABLE student (id NUMBER(5) PRIMARY K...
2007-04-28, 4682👍, 0💬

What Is NVL
What Is NVL? NVL is a function lets you substitute a value when a null value is encountered.
2007-04-15, 4682👍, 0💬

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