Scripts

A SQL script can contain one or more SQL statements or PL/SQL blocks, to do a logical unit of work. SQL scripts can be saved as files.

Convert Relational Data to JSON

Convert Relational Data to JSON in Oracle: PL/JSON Method

How to convert relational data to JSON in the Oracle database, using PL/JSON.

Read the Full Article →
Thumbnail image for SQL: Compare Two Tables for Differences in Data

SQL: Compare Two Tables for Differences in Data

How to compare two tables that share the same structure, to identify data differences between the two tables: missing rows, extra rows, or mismatch in attribute values.

Read the Full Article →
Thumbnail image for Oracle Partitioning: Range Interval Partitioning

Oracle Partitioning: Range Interval Partitioning

Create Oracle table partitions on-the-fly using range interval partitioning, a beautiful Oracle partitioning feature that obviates the need to pre-create database table partitions.

Read the Full Article →
Thumbnail image for Access Control List (ACL) in Oracle 11G

Access Control List (ACL) in Oracle 11G

Access Control List or ACL is a security mechanism that defines which users or roles can perform which operations on which data. It is an essential setup in Oracle 11G for running network packages such as UTL_HTTP.

Read the Full Article →
UTL_HTTP to Call a Web Service from PL/SQL

UTL_HTTP to Call a Web Service from PL/SQL

You can call a web service from PL/SQL using the Oracle-supplied package UTL_HTTP. This article demos a PL/SQL script to invoke a web service and read its response into a CLOB. It also describes typical errors you may encounter in web service calls and how to resolve them.

Read the Full Article →
UTL_FILE: Write to file example in PL/SQL

UTL_FILE: Write To File Example and Debugging Common Errors

Example of using UTL_FILE in PL/SQL to write to a file. Plus, ORA errors and solutions to common problems faced with UTL_FILE.

Read the Full Article →
Thumbnail image for How to Delete Old Data from a Database Schema

How to Delete Old Data from a Database Schema

DELETE script or CTAS DROP-RENAME script: ways to purge old data from a database schema so that it retains only the current year’s rows in all the tables in the schema, and the rest of the data is erased.

Read the Full Article →
Thumbnail image for Drop and Recreate All Foreign Keys on Oracle Table

Drop and Recreate All Foreign Keys on Oracle Table

You might need to reistate a dropped table in Oracle, and in doing so, restore the foreign keys as well. Here’s how to drop and recreate all foreign keys on an Oracle table.

Read the Full Article →
Thumbnail image for RETURNING the value of an auto-increment column

RETURNING the value of an auto-increment column

How to use the RETURNING clause to identify the value assigned to an auto-increment column during a particular INSERT. You might use this information for further transactions in related tables or for auditing.

Read the Full Article →
Thumbnail image for How to Find Out Your Oracle Database Name

How to Find Out Your Oracle Database Name

Oracle gives you easy ways to find out your Oracle database name from inside a SQL*Plus session. Here are three ways: using V$DATABASE, GLOBAL_NAME, and DBMS_UTILITY.GET_PARAMETER_VALUE.

Read the Full Article →