<< < 12 13 14 15 16 17 18 19 20 > >>   ∑:464  Sort:Rank

Numeric Comparison Operations in Oracle
What Are the Numeric Comparison Operations in Oracle? PL/SQL supports 6 basic numeric comparison operations as shown in the following sample script: PROCEDURE proc_comparison AS res BOOLEAN; BEGIN res := 1 = 2; res := 1 &lt; 2; res := 1 &gt; 2; res := 1 &lt;= 2; res := 1 &gt;= 2; res...
2018-08-06, 1612🔥, 0💬

Assign Values to Variables in Oracle
How To Assign Values to Variables in Oracle? You can use assignment statements to assign values to variables. An assignment statement contains an assignment operator ":=", which takes the value specified on the right to the variable on left. The script below show you some examples of assignment stat...
2018-08-06, 1592🔥, 0💬

Retrieve Data from a Cursor to a RECORD in Oracle
How To Retrieve Data from a Cursor to a RECORD in Oracle? 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 PROCEDURE FYI_CENTER AS CURSOR t_list IS SELECT ...
2018-07-22, 1761🔥, 0💬

Open and Close an Explicit Cursor in Oracle
How To Open and Close an Explicit Cursor in Oracle? 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 WHERE employee_id = 100; BEGIN OPEN c_list...
2018-07-22, 1676🔥, 0💬

Retrieve Data from an Explicit Cursor in Oracle
How To Retrieve Data from an Explicit Cursor in Oracle? 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 the current cursor pointer and assign them...
2018-07-22, 1644🔥, 0💬

Define an Explicit Cursor in Oracle
How To Define an Explicit Cursor in Oracle? 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 t_list IS SELECT * FROM employees WHERE...
2018-07-22, 1614🔥, 0💬

Loop through the Implicit Cursor in Oracle
How To Loop through Data Rows in the Implicit Curosr in Oracle? 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 "row" is a local RECORD type variable with...
2018-07-22, 1578🔥, 0💬

Open a Cursor Variable in Oracle
How To Open a Cursor Variable in Oracle? 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 exercise: CREATE OR REPLACE PROCEDURE FY...
2018-07-18, 1816🔥, 0💬

Define a Cursor Variable in Oracle
How To Define a Cursor Variable in Oracle? 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 your own generic REF CURSOR type using the...
2018-07-18, 1769🔥, 0💬

Pass a Cursor Variable to a Procedure in Oracle
How To Pass a Cursor Variable to a Procedure in Oracle? 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_print(cur SYS_REFCURSOR) AS emp_rec employ...
2018-07-18, 1720🔥, 0💬

Loop through a Cursor Variable in Oracle
How To Loop through a Cursor Variable in Oracle? 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 loop through a cursor variable: CREATE OR...
2018-07-18, 1668🔥, 0💬

Pass a Parameter to a Cursor in Oracle
How To Pass a Parameter to a Cursor in Oracle? 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 parameters: CREATE OR REPLACE PROCEDURE FYI_CE...
2018-07-18, 1513🔥, 0💬

What Is NULL in PL/SQL in Oracle
What Is NULL in PL/SQL in Oracle? 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 value, and means no value. The following sample script shows you examples of using NULL keyword: DECLARE next_task CHAR(80); ...
2018-07-13, 1834🔥, 0💬

Test NULL Values in Oracle
How To Test NULL Values in Oracle? 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 following sample script shows you examples of compari...
2018-07-13, 1798🔥, 0💬

Use "IF" Statements with Multiple Conditions in Oracle
How To Use "IF" Statements on Multiple Conditions in Oracle? If you have multiple blocks of codes to be executed based on different conditions, you can use the "IF ... ELSIF" statement. Here is a sample script on IF statements: DECLARE day VARCHAR2; BEGIN day := 'SUNDAY'; IF day = 'THURSDAY' THEN DB...
2018-07-13, 1611🔥, 0💬

Use "WHILE" Loop Statements in Oracle
How To Use "WHILE" Loop Statements in Oracle? If you have a block of codes to be executed repeatedly based a condition, you can use the "WHILE ... LOOP" statement. Here is a sample script on WHILE statements: DECLARE total NUMBER; BEGIN total := 0; WHILE total &lt; 10 LOOP total := total+1; END ...
2018-07-13, 1547🔥, 0💬

Use "FOR" Loop Statements in Oracle
How To Use "FOR" Loop Statements in Oracle? If you have a block of codes to be executed repeatedly over a range of values, you can use the "FOR ... LOOP" statement. Here is a sample script on FOR statements: DECLARE total NUMBER := 0; BEGIN FOR i IN 1..10 LOOP total := total + i; END LOOP; DBMS_OUTP...
2018-07-13, 1524🔥, 0💬

Loading and Exporting Data in Oracle
Where to find answers to frequently asked questions on Loading and Exporting Data in Oracle? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Loading and Exporting Data in Oracle. Clear answers are provided with tutorial exercises on saving data as...
2018-06-27, 1986🔥, 0💬

Quickest Way to Export Data to a Flat File in Oracle
What Is the Quickest Way to Export a Table to a Flat File in Oracle? The quickest way to export a table to a flat file is probably to use the SQL*Plus SPOOL command. It allows you to record SELECT query result to a text file on the operating system. The following tutorial exercise shows you how cont...
2018-06-27, 1902🔥, 0💬

Simplest Tool to Run Commands on Oracle Server in Oracle
What Is the Simplest Tool to Run Commands on Oracle Servers in Oracle? The simplest tool to connect to an Oracle server and run commands to manage data is SQL*Plus. It is an Oracle database client tool that works as a command-line user interface to the database server. SQL*Plus allows you: Format, p...
2018-06-27, 1736🔥, 0💬

Export Data with Field Delimiters in Oracle
How To Export Data with a Field Delimiter in Oracle? The previous exercise allows you to export data with fixed field lengths. If you want export data with variable field lengths and field delimiters, you can concatenate your fields with an expression in the SELECT clause as shown in the tutorial ex...
2018-06-27, 1667🔥, 0💬

Cursor Variable Easier to Use than Cursor in Oracle
Why Cursor Variables Are Easier to Use than Cursors in Oracle? 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 query dynamically at the time of open. C...
2018-06-27, 1643🔥, 0💬

What Is SQL*Loader in Oracle
What Is SQL*Loader in Oracle? SQL*Loader is a database tool that allows to load data from external files into database tables. SQL*Loader is available as part of the free Oracle 10g Expression Edition. It has some interesting features as: Can load data from multiple data files into multiple tables i...
2018-06-12, 2436🔥, 0💬

Start with a Minimum Initialization Parameter File in Oracle
How To Start Instance with a Minimal Initialization Parameter File in Oracle? The sample initialization parameter file provided by Oracle seems to be not working. But we can try to start the new instance with a minimal initialization parameter file (PFile). First you can create another PFile, $ORACL...
2018-05-08, 4144🔥, 0💬

<< < 12 13 14 15 16 17 18 19 20 > >>   ∑:464  Sort:Rank