Category: Oracle PL/SQL
%TYPE vs %ROWTYPE - What's the difference?
- Both %TYPE and %ROWTYPE are used to define variables in PL/SQL as ...
Accumulate from different sources
- This code accumulates 100 units of part number 9999 from various storage bins
Active Processes (DBA)
- Show the currently active processes.
Add constraint example
- Example of adding a constraint.
Add Primary Key Constraint example
- Example code showing how to add a primary constraint. This Oracle constrai...
Add PSOUG Search to SQL Developer
- Anyone who's used SQL Developer may have noticed the search engines tucked ...
Alias and RowType
- This block finds all employees whose monthly wages (salary plus commission) are higher than...
- Example of altering the datatypes or lengths of fields in the table.
Analyze All Tables
- This procedure will analyze and estimate statistics for all the tables in the user's schema.
- The AND condition allows you to create an SQL statement based on 2 or more conditions being met...
Anonymous blocks - Constants and Variables
- Anonymous blocks are used in Oracle tools where PL/SQL code is eit...
Anonymous blocks: Sample Code
- Anonymous blocks are run by copying them to the SQL*Plus command prompt then hi...
ANSI Joins: CROSS JOIN
- Example of an ANSI-style CROSS JOIN.
ANSI Joins: FULL JOIN
- Example of an ANSI-style FULL JOIN.
ANSI Joins: INNER JOIN
- Examples of an ANSI-style INNER JOIN.
ANSI Joins: OUTER JOIN
- Example of an ANSI-style OUTER JOIN
- ASCIISTR takes as its argument a string, or an expression that resolves to a string, in any characte...
Audit User Logins (User Login Trigger)
- Audit user logins and enable SQL tracing for selected users. Audit ...
Avoid overlapping months and years
- Useful way to group data by week to avoid the quandary of weeks overlappin...
Basic FOR LOOP example
- This block uses a simple FOR loop to insert 10 rows into a table. The values of a l...
- The BETWEEN condition allows you to retrieve values within a range.
- BFILENAME returns a BFILE locator that is associated with a physical LOB binary file on the server...
- BIN_TO_NUM converts a bit vector to its equivalent number. Each argument to this function represen...
Block TOAD and other tools
- Block developers from using TOAD and other tools on production databases.
- This is a sample build script for creating a database instance.
Build table example
- Simple skeleton code for table building
Built-In Functions: CASE
- Starting in Oracle 9i, you can use the case statement within an SQL statement. It ha...
Built-In Functions: DECODE
- A type of replacement function within the SELECT statement.
- The SQL engine will bulk bind all the values present for a \column in a table before returning t...
- Shows stats of objects in shared memory. Filename: dba_cache_stats.sql Parameters: None Des...
terms of service
© coderzone.org | users online: 8