To start programming I will just briefly discuss what really a PL/SQL is why I go briefly is because maybe you already know what it really is and you just want to jump in to start programming or you have read somewhere else what really it’s, PL/SQL is nothing but a programming language for Database more specifically Oracle Relation Database where you read the codes line by line if you choose to there is many feature that you can read the whole block of code but in default it’s a way that read the rows line by line rather than SQL which execute the query as bulk.
Its Block Language came into place since Oracle 7 back in days it was just a separate add-on to oracle database, it support variable, Array, condition loops and it’s an OOL “Object Oriented Language” that support all those OOP functionality if you choose to use it that like Polymorphism, encapsulation and other functionality of OOP, PL/SQL code is compiled in the database and it runs as a machine code even though you get to see the actual code but behind the scene it’s always machine codes.
PL/SQL support all feature of SQL natively including but not limited to update, insert, delete which will help you talk to the database and give you more power over the database and functionality that can be supported since SQL have its own limitation and Oracle support this and give you more package in order to streamline your work with those functions and packages like sending mail, calling URL and other functions that does not supported by SQL, there is something special in PL/SQL called packaging where you write your code and package your code in one block of code and the user will get only a input value and the rest of the code is hidden from the user like OOP methods when you create a method you make that method public and all content of that method private that only class can access.
All and all PL/SQL is a very dynamic and large language where oracle support this continually with new releases, there is many data types that are supported in SQL are available for you in PL/SQL but addition of new data types one of which that is noticeable is Boolean data type.
Here is sample code of PL/SQL so you can look around and in the future articles I’m going to write more articles about how to use PL/SQL and what improvement it can bring for you in your day to day Database Administration both in reporting section and also for Administrating Oracle database
In above block of code is the simple code of PL/SQL that execute and only show an output of “Hello World” even though it’s the simple chunk of code but still it has all coding block of PL/SQL, in the latter articles I would writing more complex PL/SQL and we go through that