Tag: Oracle SQL
The Oracle ALTER TABLE statement is used to add a column, change a column, delete a column, rename a column or rename a table (with syntax, examples and practical exercises).The Oracle/PLSQL...
Oracle/PLSQL CREATE TABLE AS operator can be used to create a table from an existing table by copying columns of an existing table.It is important to note that when creating a table in this...
The SELECT FOR UPDATE command allows you to lock entries in the resulting cursor set. The blocking of records is removed when the following commit or rollback commands are executed. Syntax of...
Oracle CURSOR - When dealing with cursors, you will need to determine your cursor status. Below is a list of cursor attributes that you can use.Attributes Explanation%ISOPEN -...
CLOSE operator - The final step in working with cursors is closing the cursor after you have finished using it. Operator CLOSE syntax CLOSE cursor name; Options and arguments of the...
FETCH operator - The purpose of using a cursor, in most cases, is to obtain rows from the cursor so that some type of operation can be performed on data.After declaring and opening the...
After you have announced the cursor in Oracle, the next step to open the cursor is to use the OPEN operator. Syntax of the OPEN operator OPEN cursor name; Options and arguments of the...
The cursor is certain operator SELECT which is declared in PLSQL code. Let's consider three different syntaxes of the cursor declaration. A CURSOR WITHOUT PARAMETERS (SIMPLE) Cursor...
The Oracle PL/SQL operator WITH allows you to give a subquery block a name/allowable that can be referenced in several places in the main SQL query.The name assigned to the subquery is...
In this tutorial you will learn how to use Oracle ALIASES (aliases for columns or tables) with syntax and examples.Oracle ALIASES can be used to create an alias for a column or...
In Oracle PLSQL Synonym is an alternative name for objects such as tables, views, sequences, stored procedures and other database objects.Typically, you use synonyms when you provide access...
In Oracle/PLSQL, you can create autonumbering using a sequence. A sequence is an Oracle object that is used to generate a number sequence. This can be useful when you need to create a unique...
In Oracle Packages a set of elements: procedures, functions, type definitions; declarations of variables, constants can be combined into a package.After writing, the PL/SQL package is...
Dynamic SQL makes your programs more flexible by creating and processing SQL sentences at runtime.With Dynamic SQL you can directly execute most types of SQL statements, including data...
Once you have created a trigger in Oracle, you may need to remove it from the database. You can do this with the DROP TRIGGER command. DROP TRIGGER syntax DROP TRIGGER name_trigger;Trigger...
In this tutorial you will learn how to create an AFTER DELETE trigger (after removal) in Oracle with syntax and examples.Oracle executes (excites) the AFTER DELETE trigger after the DELETE...