Jump to content

[ Pl/sql ] - Simple Pl/sql Statement.


Recommended Posts

Hello everyone, today we will be looking at PL/SQL the basic syntax into the SQL programming language.

PL-SQL is
a block-structure language.. this means that the actual program that you write is splitted into diffirent parts.

Every PL/SQL block is split into 3 parts:

  • Declarations
  • Executable Commands
  • Exception Handling

The declaration section will start with the keyword DECLARE this section is not required as you don't always need variables in your PL/SQL program.

The Executable section is enclosed between The BEGIN and the ENDthis section is required as this is the core of your SQL program.

A simple example of a PL/SQL program:

 
DECLARE
message varchar2(20) := 'Hello MaxCheaters;
BEGIN
dbms_output.put_line(message);
END;
 

As you see in the exampe, we decalre a variabele called message as a varchar with a length of 20.
the := means that your gonna give the variabele a value, 'Hello MaxCheaters' in our example.
 
Dbms_output.put_line();
 
dbms_output.put_line(); will print a line, as of our example, the dbms_output.put_line() has a variabele passed within the () which holds our text.
 
The dbms will show 'Hello MaxCheaters' in our sql terminal.
 
You can compare the dbms_output.put_line() with a System.out.println() or a Console.writeLine(); in java or C#.
 
Cheers!

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


  • Posts

    • I am selling the essence project which includes versions 388 and 439 that have been running for over 2 years or (447 as custom PVP like Pride). I have a test server for you to test them out. If you are really interested in it then contact my seller at discord: kiwi7106. Price: 4000 Euro P/s: This is a project that I have spent a lot of money and time developing, so if you are not interested in it, please get out of this topic, thank you. P/s 2: If you find the price too expensive, it's best to skip this article and find another project and don't comment negatively on my topic, thank you.
    • Someone ask me for this, it should work on any client that has Kamael race, preview:     Installation - there are two ways to install depending on how you want to use it:   Method 1: If you want to completely replace the original, do:   Copy all lines from your armorgrp to Notepad++, press Ctrl+H, check the "match whole word" option and replace:   kamael.Mkamael_m000_w_ad00   by:   AvengersKamaelWings.Avengers_MKamael_m001_w_ad00   Then replace:   MKamael.Mkamael_m000_t00_w   by:   AvengersKamaelWings.MKamael_m001_t00_w   Now repeat the same process with the female, replace:   kamael.Fkamael_m000_w_ad00   by:   AvengersKamaelWings.Avengers_FKamael_m001_w_ad00   Then replace:   FKamael.Fkamael_m000_t00_w   by:   AvengersKamaelWings.FKamael_m001_t00_w   You're done, paste everything back into File Edit and save!   Method 2: If you only want to replace in specific sets, execute the above process only on the armorgrp of those sets.   Repack by: AvengersTeamBr Password: LadrãoDeFrango      
    • 用于解密、加密和编辑 .u 文件的工具。
    • It's always awesome when you find someone who not only delivers great quality but also does it way ahead of schedule. Makes you feel like you hit the jackpot, right? I'm new around here, just stumbled upon this forum, and seeing posts like yours really gives me hope that there are some real pros hanging out in this community.
  • Topics

×
×
  • Create New...