PL/SQL Articles

Found 20 articles

Count odd and even digits in a number in PL/SQL

Sunidhi Bansal
Sunidhi Bansal
Updated on 14-Mar-2026 2K+ Views

We are given a positive integer of digits and the task is to calculate the count of odd and even digits in a number using PL/SQL. PL/SQL is a combination of SQL along with the procedural features of programming languages. It was developed by Oracle Corporation in the early 90's to enhance the capabilities of SQL. PL/SQL is one of three key programming languages embedded in the Oracle Database, along with SQL itself and Java. Input int number = 23146579 Output count of odd digits in a number are : 5 count of even digits in a number are : ...

Read More

Reverse a Number in PL/SQL

Prateek Jangid
Prateek Jangid
Updated on 14-Mar-2026 15K+ Views

PL/SQL is a block-structured language that combines SQL's functionality with procedural commands. In this article, we will discuss a program in PL/SQL to reverse a given number. Input : 98765 Output : 56789 Explanation : reverse number of 98765 is 56789. Input : 56784 Output : 48765 Explanation : Reverse number of '56784' is '48765'. Algorithm to Reverse a Number The algorithm to reverse a number involves extracting digits from the original number and building the reversed number step by step: Take out the last digit from the number ...

Read More

Difference between SQL and PL/SQL

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 16K+ Views

SQL (Structured Query Language) is a standard database language used to create, maintain, and retrieve data from relational databases. PL/SQL (Procedural Language extension to SQL) extends SQL by adding procedural capabilities like variables, loops, conditions, and error handling. SQL Example SQL executes a single declarative statement at a time ? -- SQL: single operation, declarative SELECT name, salary FROM employees WHERE department = 'Engineering'; PL/SQL Example PL/SQL can execute multiple operations with procedural logic ? -- PL/SQL: procedural block with variables, loops, conditions DECLARE v_name employees.name%TYPE; ...

Read More

Changing Data Element of a column and showing description in Transaction SE16N

Anjana
Anjana
Updated on 13-Mar-2026 538 Views

When working with transaction SE16N in SAP, you may need to change the data element of a column to display proper descriptions. This process involves updating the Data Dictionary (DDIC) element and ensuring the system recognizes the changes. Methods to Update Data Element Descriptions Method 1: Activate the Change The primary approach is to activate the change after modifying the data element. This ensures the system properly updates the column description in SE16N. Method 2: Force System Recognition An alternative method involves temporarily creating an error to force the system to refresh the element description ...

Read More

Program for Fibonacci numbers in PL/SQL

Sunidhi Bansal
Sunidhi Bansal
Updated on 24-Dec-2024 13K+ Views

Given ‘n’ numbers the task is to generate the Fibonacci numbers in PL/SQL starting from 0 to n, where the Fibonacci series of integers is in the form 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 Where integers 0 (1st place) and 1 (2nd place) will have a fixed place after that, the previous two digits will be added to get the integer of the next place as shown below. 0+1=1 (3rd place) 1+1=2 (4th place) 2+1=3 (5th place) and So on. Formula Sequence F(n) ...

Read More

Print all the Prime Numbers between Ëm\' and Ën\' In PL/SQL

sudhir sharma
sudhir sharma
Updated on 28-Jun-2024 1K+ Views

Introduction This article discusses the printing of prime numbers between two given values using PL/SQL. It emphasizes the importance of efficiency, precision, readability, maintainability, and error handling in software development. Optimized algorithms and data structures are employed to efficiently identify prime numbers. The use of meaningful variable names, proper indentation, and comments enhances code comprehension and adheres to coding best practices. Error handling and validation are crucial for producing reliable software solutions. The article highlights that there is an infinite number of prime numbers, underscoring the need for efficient algorithms. The focus is on providing a comprehensive and engaging ...

Read More

Print Patterns in PL/SQL

sudhir sharma
sudhir sharma
Updated on 31-Jan-2024 3K+ Views

Introduction This article simplifies how you can leverage real-world examples, syntaxes and programming techniques in PL/SQL to master printing different types of patterns effectively. Examples of Pattern Printing in PL/SQL We'll cover how to create pyramid patterns, diamond patterns, and number patterns with their respective code snippets and syntax. Going through the present section, you will have a clear understanding of how to implement these patterns in your PL/SQL programs. Pyramid Pattern For a comprehensive understanding of pattern printing in PL/SQL, delving into the pyramid pattern is an ideal starting point. Here's how to design a pyramid pattern using ...

Read More

PL/SQL User Input

sudhir sharma
sudhir sharma
Updated on 31-Jan-2024 6K+ Views

Introduction Are you unsure of how to properly handle user input in PL/SQL? We know that accurately managing this feature can massively enhance the interaction between the system and its users. This article will guide you step-by-step on effectively using user inputs, from reading and storing them in variables to implementing them within your PL/SQL logic. Let's dive into the world of efficient data manipulation. Reading User Input in PL/SQL and Storing User Input in Variables PL/SQL, a procedural language extension to SQL, empowers developers with the tools for seamless user input handling. You can easily read user inputs in ...

Read More

Floyd's triangle in PL/SQL

sudhir sharma
sudhir sharma
Updated on 01-Feb-2022 780 Views

PL/SQL is a combination of SQL along with the procedural features of programming languagesFLOYD’s triangle − it is a triangle formed by natural numbers. It is the triangle formed by filling numbers in rows starting from 1 at the top-left corner. It is a right-angled triangle i.e. the count of numbers in each row is the same as the row number.In this problem, we are given a natural number N. Our task is to create Floyd’s triangle in PL/SQL.Let’s take an example to understand the problemInput: 16 Output: 1 2 3 4 5 6 7 8 9 10 11 12 ...

Read More

Finding sum of first n natural numbers in PL/SQL

sudhir sharma
sudhir sharma
Updated on 01-Feb-2022 8K+ Views

In this problem, we are given a number N. Our task is to finding sum of first n natural numbers in PL/SQL.PL/SQL is a combination of SQL along with the procedural features of programming languages.PL/SQL has the following features −PL/SQL is tightly integrated with SQL.It offers extensive error checking.It offers numerous data types.It offers a variety of programming structures.It supports structured programming through functions and procedures.It supports object-oriented programming.It supports the development of web applications and server pages.PL/SQL has the following advantages −SQL is the standard database language and PL/SQL is strongly integrated with SQL. PL/SQL supports both static and ...

Read More
Showing 1–10 of 20 articles
« Prev 1 2 Next »
Advertisements