<< < 14 15 16 17 18 19 20 21 22 23 24 > >>   ∑:1253  Sort:Rank

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, 1716🔥, 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, 1653🔥, 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, 1748🔥, 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, 1747🔥, 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, 1643🔥, 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, 1547🔥, 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, 1449🔥, 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, 2425🔥, 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, 1622🔥, 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, 1604🔥, 0💬

Call a Sub Procedure in Oracle
How To Call a Sub Procedure in Oracle? To call a sub procedure, just use the sub procedure name as a statement. Here is another example of calling a sub procedure: SQL&gt; CREATE OR REPLACE PROCEDURE WELCOME AS 2 PROCEDURE WELCOME_PRINT(S CHAR) AS 3 BEGIN 4 DBMS_OUTPUT.PUT_LINE('Welcome to ' || ...
2018-10-26, 1564🔥, 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, 1478🔥, 0💬

Use "IN OUT" Parameters in Oracle
How To Use "IN OUT" Parameter Properly in Oracle? Here are the rules about IN OUT parameters: A formal IN OUT parameter acts like an initialized variable. An actual IN OUT parameter must be a variable. An actual IN OUT parameter passes a copy of its value to the formal parameter when entering the pr...
2018-10-19, 2377🔥, 0💬

Use "OUT" Parameters in Oracle
How To Use "OUT" Parameter Properly in Oracle? Here are the rules about OUT parameters: A formal OUT parameter acts like an un-initialized variable. It must be assigned with new values before the end of the procedure or function. An actual OUT parameter must be a variable. An actual OUT parameter wi...
2018-10-19, 1771🔥, 0💬

Parameter Modes Supported by PL/SQL in Oracle
What Are the Parameter Modes Supported by PL/SQL in Oracle? PL/SQL supports 3 parameter modes on procedure/function parameters: IN: This is the default mode. IN parameters allow the calling code to pass values into the procedure or function. OUT: OUT parameters allow the procedure or function to pas...
2018-10-19, 1621🔥, 0💬

Define Default Values for Formal Parameters in Oracle
How To Define Default Values for Formal Parameters in Oracle? If you have an IN parameter, you can make it as an optional parameter for the calling statement by defining the formal parameter with the DEFAULT clause. This gives you the freedom of not providing the actual parameter when calling this p...
2018-10-19, 1614🔥, 0💬

Use "IN" Parameters in Oracle
How To Use "IN" Parameter Properly in Oracle? Here are the rules about IN parameters: A formal IN parameter acts like constant. It can not be assigned with new values. An actual IN parameter can take a value or a variable. An actual IN parameter is passed by reference to the specified value or the v...
2018-10-19, 1516🔥, 0💬

What Are Named Parameters in Oracle
What Are Named Parameters in Oracle? Named parameters are actual parameters specified not by position but by providing formal parameter names when calling the procedure or function. The main advantage of named parameters is that the caller don't have to remember the position of each parameter. But t...
2018-10-13, 1797🔥, 0💬

Working with Database Objects in Oracle PL/SQL
Where to find answers to frequently asked questions on Working with Database Objects in Oracle PL/SQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Working with Database Objects in Oracle PL/SQL. Clear answers are provided with tutorial exercis...
2018-10-13, 1652🔥, 0💬

Use DML Statements in PL/SQL in Oracle
Can DML Statements Be Used in PL/SQL in Oracle? 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 notation, as shown in the following sample code: (...
2018-10-13, 1586🔥, 0💬

Cannot Use DDL Statements in PL/SQL in Oracle
Can DDL Statements Be Used in PL/SQL in Oracle? 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 DROP TABLE student; -- compilation error END; /   ...
2018-10-13, 1482🔥, 0💬

Scope of Local Variables in Oracle
What Is the Scope of a Local Variable in Oracle? The scope of a variable can be described with these rules: A variable is valid within the procedure or function where it is defined. A variable is also valid inside a sub procedure or function defined. If a variable name is collided with another varia...
2018-10-13, 1457🔥, 0💬

Run SQL*Plus Commands in SQL Developer in Oracle
How To Run SQL*Plus Commands in SQL Developer in Oracle? Most of the time, you only run SQL statements in SQL Worksheet, the SQL statement area. But you can also run some SQL*Plus commands in SQL Worksheet. The example below shows you how to run the DECRIBE command in SQL Developer: Go to SQL Worksh...
2018-10-08, 2065🔥, 0💬

Export Connection Information to a File in Oracle
How To Export Your Connection Information to a File in Oracle? SQL Developer allows you to export your connection information into an XML file. Here is how to do this: Right-click on Connections Select Export Connection... Enter File Name as: \temp\connections.xml Click OK Open \temp\connections.xml...
2018-10-08, 1535🔥, 0💬

<< < 14 15 16 17 18 19 20 21 22 23 24 > >>   ∑:1253  Sort:Rank