r/plsql • • Dec 11 '21

Help with some PLSQL Code

0 Upvotes

Hi, I'm currently working on my final project for my PLSQL class and I was wondering if somebody could help me. I wrote down almost everything I need to create the tables, but I keep getting dumb errors. I was looking for some guidance to help me finish the project.

Anything would help really; Thank You

PS. If you could help me out, and you want to contact me, here is my Discord: Ac3#0055


r/plsql • • May 21 '17

PL/SQL Listagg function

Thumbnail plsql.co
1 Upvotes

r/plsql • • Jan 18 '22

Difference Between Delete And Truncate in Oracle SQL

Thumbnail
javainhand.com
0 Upvotes

r/plsql • • Apr 21 '18

Top 10 Oracle pl/sql Interview Questions

Thumbnail
asporacle.com
3 Upvotes

r/plsql • • Apr 29 '25

Difference Between Implicit and Explicit Cursor in Oracle PLSQL

Post image
1 Upvotes

r/plsql • • Jan 21 '22

Select Into Statement in Oracle PL/SQL

Thumbnail
javainhand.com
0 Upvotes

r/plsql • • May 25 '18

Create & Use View

Thumbnail
asporacle.com
0 Upvotes

r/plsql • • Jul 04 '18

Create Stored procedure in oracle database

Thumbnail
asporacle.com
1 Upvotes

r/plsql • • Nov 21 '22

Function Related Interview Questions in Oracle PL/SQL

Thumbnail javainhand.com
0 Upvotes

r/plsql • • Jan 13 '25

%ROWTYPE in Oracle PLSQL with Example

Thumbnail
javainhand.com
1 Upvotes

r/plsql • • Aug 06 '18

Create Oracle Sql Functions

Thumbnail
asporacle.com
1 Upvotes

r/plsql • • May 14 '23

SQL SORT FUNCTION

Thumbnail
guerillateck.com
0 Upvotes

r/plsql • • May 11 '23

SQL WHERE, HAVING, AND, OR, AS CLAUSES

Thumbnail
guerillateck.com
0 Upvotes

r/plsql • • Jan 18 '22

PL/SQL Program To Print Star Pattern Part 1

Thumbnail
javainhand.com
0 Upvotes

r/plsql • • Jan 18 '22

PL/SQL Program To Print Rectangular Star Pattern Part 2

Thumbnail
javainhand.com
0 Upvotes

r/plsql • • Jan 18 '22

PL/SQL Program to Print Half Pyramid Using Numbers-Javainhand Tutorial

Thumbnail
javainhand.com
0 Upvotes

r/plsql • • Jan 18 '22

PL/SQL Program to Print the Inverted Right Triangle Star Pattern- Javainhand Tutorial

Thumbnail
javainhand.com
0 Upvotes

r/plsql • • Feb 25 '19

The great book of puzzles and teasers " Puzzle 1 in PL/SQL

0 Upvotes

"The great book of puzzles and teasers " Puzzle 1:-

Two of Anthony, Bernard, and Charles are fightingeach other.[I] The shorter of Anthony and Bernard IS theolder of the two fighters.[2]The younger of Bernard and Charles IS theshorter of the two fighters.[3 ] The taller of Anthony and Charles is the youngerof the two fighters.Who is not fighting?

Program:-Run in the below link

https://rextester.com/l/oracle_online_compiler

Give any distinct input for age and height then the system will correctly calculate who is not fighting and all players A, B, C 's corresponding age and height

DECLARE
ha NUMBER := 4;
hb NUMBER := 6;
hc NUMBER := 7;
aa NUMBER := 60;
ab NUMBER := 40;
ac NUMBER := 30;
hai NUMBER := ha;
hbi NUMBER := hb;
hci NUMBER := hc;
aai NUMBER := aa;
abi NUMBER := ab;
aci NUMBER := ac;
agebuffer NUMBER;
heightbuffer NUMBER;
l_reach BOOLEAN := FALSE;
BEGIN
dbms_output.Put_line('lets say a and c are fighting');

IF ha > hb THEN
heightbuffer := hb;

hb := ha;

ha := heightbuffer;
END IF;

IF ac > aa THEN
agebuffer := ac;

ac := aa;

aa := agebuffer;
END IF;

IF ab < ac THEN
agebuffer := ab;

ab := ac;

ac := agebuffer;
END IF;

IF ha < hc THEN
heightbuffer := hc;

hc := ha;

ha := heightbuffer;
END IF;

IF ha > hc THEN
IF aa < ac THEN
dbms_output.Put_line('B is not fighting');

l_reach := TRUE;
END IF;
END IF;

IF NOT l_reach THEN
dbms_output.Put_line('lets say b and c are fighting');

ha := hai;

hb := hbi;

hc := hci;

aa := aai;

ab := abi;

ac := aci;

IF hb > ha THEN
heightbuffer := hb;

hb := ha;

ha := heightbuffer;
END IF;

IF ac > ab THEN
agebuffer := ac;

ac := ab;

ab := agebuffer;
END IF;

IF ha > hc THEN
heightbuffer := hc;

hc := ha;

ha := heightbuffer;
END IF;

IF ab < ac THEN
agebuffer := ab;

ab := ac;

ac := agebuffer;
END IF;

IF ac < ab THEN
IF hc < hb THEN
dbms_output.Put_line('A is not fighting');

l_reach := TRUE;
END IF;
END IF;
END IF;

IF NOT l_reach THEN
dbms_output.Put_line('lets say a and b are fighting');

ha := hai;

hb := hbi;

hc := hci;

aa := aai;

ab := abi;

ac := aci;

IF ab > ac THEN
agebuffer := ab;

ab := ac;

ac := agebuffer;
END IF;

IF aa > ac THEN
agebuffer := ac;

ac := aa;

aa := agebuffer;
END IF;

IF ha < hb THEN
heightbuffer := hb;

hb := ha;

ha := heightbuffer;
END IF;

IF ha < hc THEN
heightbuffer := hc;

hc := ha;

ha := heightbuffer;
END IF;

IF ab < aa THEN
agebuffer := ab;

ab := aa;

aa := agebuffer;
END IF;

IF hb < ha THEN
IF aa > ab THEN
agebuffer := ab;

ab := aa;

aa := agebuffer;
END IF;
ELSIF ha < hb THEN
IF ab > aa THEN
agebuffer := ab;

ab := aa;

aa := agebuffer;
END IF;
END IF;

IF aa < ab
AND ha > hb THEN
dbms_output.Put_line('C is not fighting');

l_reach := TRUE;
END IF;
END IF;

dbms_output.Put_line('Ages A~'
                         ||aa
                         ||'B~'
                         ||ab
                         ||'C~'
                         ||ac);

dbms_output.Put_line('height A~'
                         ||ha
                         ||'B~'
                         ||hb
                         ||'C~'
                         ||hc);
END;


r/plsql • • Aug 01 '22

SQL — Explained like you are 5!

Thumbnail
medium.com
0 Upvotes

r/plsql • • May 09 '16

PLSQL FUNCTIONS, HELP Please

0 Upvotes

I am trying to learn plsql and i have a teacher and student database to play around with.

I am trying to turn this plsql block into a function

DECLARE v_class_id enrollments.class_id%type:=:CLass_ID; v_count number; BEGIN SELECT count(stu_id) INTO v_count FROM enrollments WHERE class_id=v_class_id; dbms_output.put_line('The amount of people in this class are: ' || v_count); END;

This is what i've tried doing,

CREATE OR REPLACE FUNCTION STUDENTCOUNT v_class_id enrollments.class_id%type:=:CLass_ID;
RETURN Number IS v_count number; BEGIN SELECT count(stu_id) INTO v_count FROM enrollments WHERE class_id=v_class_id; dbms_output.put_line('The amount of people in this class are: ' || v_count); END;

I am very new to this, any help and good explanation would be awesome

THANKS!


r/plsql • • Mar 31 '21

What is PL/SQL in Hindi

0 Upvotes

We have Uploaded New PL/SQL Tutorial Video.

Go and Checkout:-

https://youtu.be/NMYYu39tmjI


r/plsql • • May 06 '21

PL/SQL Block Structure in Hindi || Javainhand Tutorial

Thumbnail
youtube.com
0 Upvotes

r/plsql • • Apr 01 '21

Anonymous Block in PL/SQL

Thumbnail
javainhand.com
0 Upvotes

r/plsql • • Mar 07 '24

Oracle PL/SQL Tutorial 23- Explicit Cursor in PL/SQL with Example in Hin...

Thumbnail
youtube.com
0 Upvotes

r/plsql • • Mar 17 '24

Cursor FOR LOOP in PL/SQL with Example

Thumbnail
youtu.be
0 Upvotes