<< < 1 2 3 4 5 6 7 8 9 10 > >>   Sort: Rank

PL/SQL Functions in Oracle
What Is a Function in Oracle? A function is a named program unit. It consists of three parts: Declaration Part - Defining the function name, calling parameters, return value type, local variables and local procedures. Declaration part is required. Execution Part - Defining execution logic with execu...
2018-11-29, 610👍, 0💬

PL/SQL Anonymous Block in Oracle
What Is an Anonymous Block in Oracle? An anonymous block is a PL/SQL code block with no name. It consists of three parts: Declaration Part - Defining local variables and local procedures. Declaration part is optional. Execution Part - Defining execution logic with executable statements. Execution pa...
2018-11-29, 608👍, 0💬

Different Types of PL/SQL Code Blocks in Oracle
What Are the Different Types of PL/SQL Code Blocks in Oracle? 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. It is similar to a...
2018-11-29, 588👍, 0💬

PL/SQL Named Program Unit in Oracle
What Is a Named Program Unit in Oracle? A named program unit is a PL/SQL code block with an name. It consists of three parts: Declaration Part - Defining the program unit name, calling parameters, local variables and local procedures. Declaration part is required. Execution Part - Defining execution...
2018-11-29, 569👍, 0💬

PL/SQL Procedure in Oracle
What Is a Procedure in Oracle? A procedure is a named program unit. It consists of three parts: Declaration Part - Defining the procedure name, calling parameters, local variables and local procedures. Declaration part is required. Execution Part - Defining execution logic with executable statements...
2018-11-29, 529👍, 0💬

Scalar Data Types Supported in PL/SQL in Oracle
How Many Scalar Data Types Are Supported in PL/SQL in Oracle? PL/SQL supports many scalar data types divided into 4 groups: Numeric Types: BINARY_DOUBLE, BINARY_FLOAT, BINARY_INTEGER, DEC, DECIMAL, DOUBLE PRECISION, FLOAT, INT, INTEGER, NATURAL, NATURALN, NUMBER, NUMERIC, PLS_INTEGER, POSITIVE, POSI...
2018-11-17, 601👍, 0💬

Convert Character Types to Numeric Types in Oracle
How To Convert Character Types to Numeric Types in Oracle? You can convert character types to numeric types in two ways: Explicitly by using TO_NUMBER() function. Implicitly by putting character data in a numeric operation. The sample script below shows you how to convert character types to numeric ...
2018-11-17, 551👍, 0💬

Categories of Data Types in PL/SQL in Oracle
How Many Categories of Data Types in Oracle? PL/SQL data types are grouped into 4 categories: Scalar Data Types: A scalar data type holds a single value. Composite Data Types: A composite data type has internal components, such as the elements of an array. LOB Data Types: A LOB data type holds a lob...
2018-11-17, 518👍, 0💬

Declare Local Variables in Oracle
How To Declare a Local Variable in Oracle? A local variable can be defined in the declaration part with a declaration statement, which is a variable name followed a data type identifier. Below are some examples of declaration statements: PROCEDURE proc_var_1 AS domain VARCHAR2(80); price REAL; is_fo...
2018-11-17, 483👍, 0💬

Types of Execution Flow Control Statements in Oracle
What Are the Execution Control Statements in Oracle? PL/SQL supports three groups of execution control statements: IF Statements - Conditionally executes a block of statements. CASE Statements - Selectively executes a block of statements. LOOP Statements - Repeatedly executes a block of statements. ...
2018-11-17, 456👍, 0💬

Create a Stored Function in Oracle
How To Create a Stored Function in Oracle? A stored function is a function with a specified name and stored into the current database. If you want to create a stored function, you can use the CREATE FUNCTION statement. The example script below creates a stored procedure: SQL&gt; CREATE OR REPLAC...
2018-11-11, 857👍, 0💬

Create a Stored Procedure in Oracle
How To Create a Stored Procedure in Oracle? 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 script below creates a stored procedure: SQL&gt; CREATE PROC...
2018-11-11, 739👍, 0💬

Drop a Stored Procedure in Oracle
How To Drop a Stored Procedure in Oracle? If there is an existing stored procedure and you don't want it any more, you can remove it from the database by using the DROP PROCEDURE statement as shown in the following script example: SQL&gt; CREATE PROCEDURE Greeting AS 2 BEGIN 3 DBMS_OUTPUT.PUT_LI...
2018-11-11, 732👍, 0💬

Pass Parameters to Procedures in Oracle
How To Pass Parameters to Procedures in Oracle? 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 shows you how to do this: SQL&gt; CREATE OR REPLACE PROC...
2018-11-11, 712👍, 0💬

Execute a Stored Procedure in Oracle
How To Execute a Stored Procedure in Oracle? If you want to execute a stored procedure, you can use the EXECUTE statement. The example script below shows how to executes a stored procedure: SQL&gt; set serveroutput on; SQL&gt; CREATE PROCEDURE Greeting AS 2 BEGIN 3 DBMS_OUTPUT.PUT_LINE('Welc...
2018-11-11, 659👍, 0💬

How Many Anonymous Blocks Can Be Defined in Oracle
How Many Anonymous Blocks Can Be Defined in Oracle? 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 defined block, as shown in the fol...
2018-10-30, 716👍, 0💬

Types of PL/SQL Code Blocks in Oracle
What Are the Types PL/SQL Code Blocks in Oracle? 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. It is similar to an anonymous b...
2018-10-30, 603👍, 0💬

What Is PL/SQL in Oracle
What Is PL/SQL in Oracle? 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 statements, that are not available ...
2018-10-30, 578👍, 0💬

Define an Anonymous Block in Oracle
How To Define an Anonymous Block in Oracle? An anonymous block must have an execution part, which is a group of other PL/SQL statements enclosed in the BEGIN ... END statement. Here is a script on how to define a simple anonymous block with SQL*Plus: SQL&gt; set serveroutput on; SQL&gt; begi...
2018-10-30, 520👍, 0💬

Run the Anonymous Block Again in Oracle
How To Run the Anonymous Block Again in Oracle? If you have an anonymous block defined in your session, you can run it any time by using the "/" command as shown in the following script: SQL&gt; set serveroutput on; SQL&gt; begin 2 dbms_output.put_line('This is a PL/SQL FAQ.'); 3 end; 4 / Th...
2018-10-30, 518👍, 0💬

Drop a Stored Function in Oracle
How To Drop a Stored Function in Oracle? If there is an existing stored function and you don't want it any more, you can remove it from the database by using the DROP FUNCTION statement as shown in the following script example: SQL&gt; CREATE OR REPLACE FUNCTION GET_SITE 2 RETURN VARCHAR2 AS 3 B...
2018-10-26, 665👍, 0💬

Call a Stored Function in Oracle
How To Call a Stored Function in Oracle? A stored function can be called as part of expression in any PL/SQL statement. One simplest way to call a stored function is to a dummy SELECT statement as shown in the following tutorial script using SQL*Plus: SQL&gt; CREATE OR REPLACE FUNCTION GET_SITE ...
2018-10-26, 605👍, 0💬

Define a Sub Procedure in Oracle
How To Define a Sub Procedure in Oracle? A sub procedure is a named procedure defined and used inside another procedure or function. You need to define a sub procedure in the declaration part of the enclosing procedure or function. Sub procedure definition starts with the PROCEDURE key word. Here is...
2018-10-26, 596👍, 0💬

Call a Stored Functoin with Parameters in Oracle
How To Call a Stored Function with Parameters in Oracle? 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&gt; CREATE OR REPLACE FUNCTION GET_DOUBLE(X NUMBER) 2 RETURN NUMBER A...
2018-10-26, 565👍, 0💬

<< < 1 2 3 4 5 6 7 8 9 10 > >>   Sort: Rank