PL/SQL Program to Swap two Numbers

Swapping the values of two variables (making a become b and b become a) is one of the most fundamental logic puzzles in programming. In PL/SQL, this is easily accomplished by using a third, temporary variable. This simple guide will…

PL/SQL Program for Palindrome Number

A "palindrome" is a number (or word) that reads the same backward as it does forward. For example, 121, 535, and 7 are all palindrome numbers. Writing a program to check for this is a great exercise because it combines…

PL/SQL Program to Reverse a String

Writing a program to reverse a string (for example, turning "hello" into "olleh") is a classic programming challenge. It's a great way to learn how to use loops and string functions to manipulate data one character at a time. This…

PL/SQL Program to Check Number is Odd or Even

Determining if a number is odd or even is a fundamental programming exercise. In PL/SQL, this is very easy to do and is the perfect way to learn about conditional logic (IF...THEN...ELSE) and the MOD function. This simple guide will…

PL/SQL Program for Fibonacci Series

The Fibonacci series is a famous mathematical sequence where each new number is the sum of the two preceding ones. Writing a program to generate this sequence is a fantastic exercise for learning how to manage and "shift" variable values…

PL/SQL Program for Reverse of a Number

Writing a program to reverse a number (for example, turning 12345 into 54321) is a classic programming challenge. It's a great way to learn how to use loops and basic math functions like MOD and TRUNC to manipulate individual digits.…

PL/SQL Program to Print Table of a Number

A common exercise for learning any new programming language is to print a multiplication table (e.g., the "5 times table"). This is a perfect task for learning how to use loops and print formatted output in PL This simple guide…

PL/SQL Program for Prime Number

Writing a program to determine if a number is prime is a classic programming challenge. It's a great exercise to learn about loops, conditional logic (IF statements), and boolean flags in PL This simple guide will walk you through the…

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,…