Found 19 Articles for PL/SQL

Database Wars: MSSQL Server, Oracle PL/SQL and MySQL

Samual Sam
Updated on 16-Jan-2020 07:56:19
With so many databases in the market, the mind wars have begun and it is the right time to understand the difference and importance of top 3 relational databases in the market – Microsoft SQL Server, Oracle PL/SQL, and MySQL. The relational database management systems have currently become the backbone of the industry and with so many options available, it is difficult to figure out which one to choose.The relational database management systems was introduced in 1980’s. This article is focussing on exploring the history and features of three popular RDBMS in the industry: Microsoft SQL Server, Oracle, and MySQL. ... Read More

Difference between SQL and PL/SQL

Mahesh Parahar
Updated on 27-Nov-2019 07:32:03
SQL, Structural Query Language is a standard database language which is used create, maintain and retrieve the relational database whereas PL/SQL, Procedural Language extension to SQL, it extends SQL and provide it procedural capabilities.Following are the important differences between SQL and PL/SQL.Sr. No.KeySQLPL/SQL1DefinitionSQL, is Structural Query Language for database.PL/SQL is a programming language using SQL for a database.2VariablesSQL has no variables.PL/SQL has variables, data types etc.3Control StructuresSQL has no FOR loop, if control and similar structures.PL/SQL has FOR loop, while loop, if controls and other similar structures.4OperationsSQL can execute a single operation at a time.PL/SQL can perform multiple operation at ... Read More

Check if a number is Palindrome in PL/SQLs

Arnab Chakraborty
Updated on 27-Sep-2019 10:42:03
In this section we will see how to check whether a number is Palindrome or not using the PL/SQL. In PL/SQL code, some group of commands are arranged within a block of related declaration of statements.A number is palindrome if the number, and the reverse of that number are same. Suppose a number 12321, this is palindrome, but 12345 is not a palindrome.ExampleDECLARE    n number;    m number;    temp number:=0;    rem number; BEGIN    n :=12321;    m :=n;    while n>0    loop       rem := mod(n, 10);       temp := (temp*10)+rem; ... Read More

Check if a given year is leap year in PL/SQL

Arnab Chakraborty
Updated on 27-Sep-2019 07:46:15
Here we will see how to check given year is leap year or not, using PL/SQL. In PL/SQL code, some group of commands are arranged within a block of related declaration of statements.The leap year checking algorithm is like below.AlgorithmisLeapYear(year): begin    if year is divisible by 4 and not divisible by 100, then       it is leap year    else if the number is divisible by 400, then       it is leap year    else       it is not leap year endExampleDECLARE    year NUMBER := 2012; BEGIN    IF MOD(year, 4)=0   ... Read More

Program for Fibonacci numbers in PL/SQL

Sunidhi Bansal
Updated on 20-Sep-2019 14:39:12
Given with ‘n’ numbers the task is to generate the fibonacci numbers in PL/SQL starting from 0 to n where fibonacci series of integer is in the form0, 1, 1, 2, 3, 5, 8, 13, 21, 34Where, integer 0 and 1 will have fixed space, after that two digits are added for example, 0+1=1(3rd place) 1+1=2(4th place) 2+1=3(5th place) and So onSequence F(n) of fibonacci series will have recurrence relation defined as −Fn = Fn-1 + Fn-2 Where, F(0)=0 and F(1)=1 are always fixedPL/SQL is an Oracle product which is a combination of SQL and Procedural language(PL) introduced in early ... Read More

Print pyramid of tutorialspoint in PL/SQL

Sunidhi Bansal
Updated on 09-Aug-2019 06:19:06
PL/SQL stands for “Procedural Language extension to SQL” . It is the mixture of SQL and Procedural features provided by programming language. It was developed by Oracle Corporation in the late 1980s as procedural extension language for SQL and the Oracle relational database.PL/SQL programs consists of blocks that can be nested and a block structure look likes this −DECLARE    -- it contains declaration statements BEGIN    -- It contains executable statements EXCEPTIONS    -- It contains exception handling statements END;ExampleIn PL/SQL single-line comments begin with double hyphen(--) and Multi-line comments begin with a slash-asterisk ( /* ) and end ... Read More

How to use SUM function for NUMC type field?

Johar Ali
Updated on 30-Jul-2019 22:30:20
NUMC is numeric text. As this is text, SUM function cannot be implemented as it is of type varchar in the database.There is no simple solution to do it. The one method is to copy the data to internal tables, convert the NUMC data into DEC by looping through all the rows, SUM and GROUP them and then convert back the DEC values back to NUMC values.

Can’t create a Dictionary Object: View by adding two db tables

Amit Sharma
Updated on 30-Jul-2019 22:30:20
When you create a view, it is created on top of multiple database tables using an inner join. Note that basis table of database views should be transparent tables.To create a view on 2 tables, you have to enter the primary table you want to maintain and place the cursor in that field and click on the button below the list of tables and select the other table to add the view. If you are not getting this option, it means Relationship is wrong.To know more about database Views: More

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

Updated on 30-Jul-2019 22:30:20
You probably need to activate the change. Other option is by deleting the description and enter the wrong character in data element name.This will make the system show an error message since that element does not exist.Correct the DDIC element spelling. The system now considers this a big enough change to the pull in an correct description of the element.