In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements.
In declare part, we declare variables and between begin and end part, we perform the operations.
Basic structure of pl/sql block
declare -- declare all the variables begin -- for start block -- make a program here end -- for end block
You have given two numbers num1 and num2 the your task is to swap the value of given numbers.
Input : num1 = 1000 num2 = 2000 Output : num1 = 2000 num2 = 1000 Input : num1 = 40 num2 = 20 Output : num1 = 20 num2 = 40
before num1 = 1000 num2 = 2000 after num1 = 2000 num2 = 1000
- Swap two numbers in PL/SQL without using temp
- PLSQL | ABS Function
- PLSQL | COS Function
- PLSQL | SIN Function
- PLSQL | LN Function
- Difference between SQL and PLSQL
- PLSQL | EXP Function
- PLSQL | LOG Function
- PLSQL | TAN Function
- PLSQL : || Operator
- PLSQL | MOD Function
- PLSQL | LEAST Function
- PLSQL | CHR Function
- PLSQL | SOUNDEX Function
- PLSQL | INSTR2 Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.