PL/SQL Program To Add Two Numbers

This is one of the most basic and common programs for beginners to write. It teaches you the fundamental structure of a PL/SQL program, including how to declare variables, assign values, perform a calculation, and print the result. This simple…

PL/SQL Program to Print Patterns

Printing patterns like triangles and pyramids is a classic programming exercise for learning how to use loops. In Oracle, you can do this using PL/SQL (Procedural Language/SQL). This simple guide will show you the basic building blocks and two common…

Oracle JSON_TRANSFORM Function

The JSON_TRANSFORM function is Oracle's most powerful tool for modifying JSON data directly within a SQL query. While JSON_VALUE and JSON_QUERY are used to read data, JSON_TRANSFORM is used to change it. This function allows you to perform a series…

Oracle JSON_SERIALIZE Function

The JSON_SERIALIZE function in Oracle SQL is a conversion function that takes JSON data (stored as a JSON type, VARCHAR2, CLOB, or BLOB) and converts it back into a textual representation. This function is not for querying JSON (like JSON_VALUE…

Oracle JSON_SCALAR Function

The JSON_SCALAR function in Oracle SQL is a constructor function that converts a single SQL scalar value (like a NUMBER, VARCHAR2, or DATE) into its equivalent JSON scalar value, returned as the native JSON type. A "scalar" is a simple,…

Oracle JSON_OBJECT Function

The JSON_OBJECT function in Oracle SQL is a "constructor" function. Its job is the opposite of JSON_VALUE or JSON_QUERY. Instead of extracting data from JSON, JSON_OBJECT builds a new JSON object string from regular SQL key-value pairs. This is essential…

Oracle JSON_ARRAY Function

The JSON_ARRAY function in Oracle SQL is a "constructor" function. Its job is the opposite of JSON_VALUE or JSON_QUERY. Instead of extracting data from JSON, JSON_ARRAY builds a new JSON array string from regular SQL values (like strings, numbers, or…

Oracle JSON_VALUE Function

When working with JSON data in Oracle, you have two main functions for extracting data: JSON_VALUE and JSON_QUERY. The difference is simple but critical: This tutorial focuses on JSON_VALUE, which is the function you use when you want to pull…

Oracle JSON_QUERY Function

When working with JSON data in Oracle, you have two main functions for extracting data: JSON_VALUE and JSON_QUERY. This tutorial focuses on JSON_QUERY, which you use when you want to extract a piece of the JSON itself, not just a…