Language PL/SQL
Date: | 04/20/05 |
Author: | Anonymous |
URL: | n/a |
Comments: | 6 |
Info: | n/a |
Score: | ![]() |
PL/SQL is a programming language that resides in an Oracle database. As PL/SQL has no standard input or output this version is written to be run from the SQLPlus command line using an anonymous PL/SQL block. /* Start of code */ set serveroutput on DECLARE counter NUMBER; BEGIN dbms_output.enable; FOR counter IN REVERSE 1..99 LOOP dbms_output.put_line(counter || ' bottles of beer on the wall,'); dbms_output.put_line(counter || ' bottles of beer.'); dbms_output.put_line('Take one down, pass it around,'); IF (counter != 1) THEN dbms_output.put_line(counter - 1 || ' bottles of beer on the wall.'); ELSE dbms_output.put_line('No more beers.'); END IF; END LOOP; END; / /* End of code (The "/" in the line above is very important) */
Download Source | Write Comment
Alternative Versions
Version | Author | Date | Comments | Rate |
---|---|---|---|---|
Another take on Oracle's DB language | Tysher | 11/13/09 | 0 | ![]() ![]() |
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments