Please Comment, Subscribe and Click Bell🔔🔔🔔 Icon for More Updates. To learn software course from our experts please register here for online training: goo.gl/HIB0wL
Question 1: Create a procedure that accepts 3 parameters, the first two are of mode IN with number as their datatype and the third one is of mode OUT in form of Varchar2. The procedure will compare the first two numbers and output the result as EQUAL, or DIFFERENT. Create a second procedure called L8Q1 that accepts the two sides of a rectangle. The procedure will calculate the area and the perimeter of the rectangle. Use the procedure created previously to display if the shape is a square or a rectangle. The following are the example on how we execute the procedure and the expected output. SQL > exec L4Q1(2,2) The area of a square size 2 by 2 is 4. It`s perimeter is 8. SQL > exec L4Q1(2,3) The area of a rectangle size 2 by 3 is 6. It`s perimeter is 10.
Create a function named 'find_stadium_count' which takes k_city_id as input and returns the stadium_count, i.e., it returns the number of stadiums in the city which its corresponding id as k_city_id. Use the skeleton file, to create the function. Function name: find_stadium_count Input parameter : k_city_id with data type as int. Output parameter : stadium_count with data type as int. Table used : k_venue. when i tried i am getting compilation error plz help me out sir...! please write a function for the given specifications sir?
Can you help me in this Create a pseudo function called pseudo_fun that accepts 2 parameters represented the height and width of a rectangle. The pseudo function should return the area and the perimeter of the rectangle. Create a second procedure called L4Q2 that accepts the two sides of a rectangle. The procedure will use the pseudo function to display the shape, the area and the perimeter. SQL > exec L4Q2(2,2) The area of a square size 2 by 2 is 4. It`s perimeter is 8. SQL > exec L4Q2(2,3) The area of a rectangle size 2 by 3 is 6. It`s perimeter is 10.
can we call functions inside the procedure and can we call procedure inside the function in sql? plz tell me sir.......i need for 2 examples regarding above problems
Yes , we are able to call function inside the procedure, but no idea about calling procedure inside the function . I had implemented it in our company.
How to create Function in pgsql that if id=0 then insertion operation will be done elsif id>0 and is_active=1 then updation operation must be done elsid id>0 and is_active=0 then update only is_active=0
SYNTAX FOR SQL * PLUS (other_way round) 1 SQL> CREATE OR REPLACE 2 FUNCTION CALC ( a IN number, b IN number , op IN varchar)RETURN number 3 is 4 RESULT NUMBER(10); 5 begin 6 if op ='+' then 7 result:= (a+b); 8 elsif op ='-'then 9 result :=(a-b); 10 elsif op ='*' then 11 result:= (a*b); 12 else 13 result :=(a/b); 14 end if; 15 RETURN result; 16 end; 17 /
Please Comment, Subscribe and Click Bell🔔🔔🔔 Icon for More Updates. To learn software course from our experts please register here for online training: goo.gl/HIB0wL
Your all video is so awesome that any one can be good in PL/SQL Programming .. A salute to you sir :)
Question 1:
Create a procedure that accepts 3 parameters, the first two are of mode IN with number as
their datatype and the third one is of mode OUT in form of Varchar2. The procedure will
compare the first two numbers and output the result as EQUAL, or DIFFERENT.
Create a second procedure called L8Q1 that accepts the two sides of a rectangle. The
procedure will calculate the area and the perimeter of the rectangle. Use the procedure
created previously to display if the shape is a square or a rectangle. The following are the
example on how we execute the procedure and the expected output.
SQL > exec L4Q1(2,2)
The area of a square size 2 by 2 is 4. It`s perimeter is 8.
SQL > exec L4Q1(2,3)
The area of a rectangle size 2 by 3 is 6. It`s perimeter is 10.
Awesome explanation sir.....................
great explaination sir
Thank you 🖒
Create a function named 'find_stadium_count' which takes k_city_id as
input and returns the stadium_count, i.e., it returns the number of
stadiums in the city which its corresponding id as k_city_id.
Use the skeleton file, to create the function.
Function name: find_stadium_count
Input parameter : k_city_id with data type as int.
Output parameter : stadium_count with data type as int.
Table used : k_venue.
when i tried i am getting compilation error plz help me out sir...!
please write a function for the given specifications sir?
Sir you are grate!! Thank you sir........
What is "from dual" in the end of example function ?
It is a dummy table
@@bhargavkumar8522 can you explain it briefly.
@@bhargavkumar8522 ⁉️
Am only see your videos when reading Oracle and purchased your text book from naresh it sir .
Nice explanation sir
Sir function calc ఏదైన ఉండచ్చా Sir
Sir we must use capitals in' creating or replace function' line
PL SQL is not a case sensitive
Best video to learn functions
sir, i need for answer with 2 examples....
Why from dual is used?
It's a dummy table
Can you help me in this
Create a pseudo function called pseudo_fun that accepts 2 parameters represented the
height and width of a rectangle. The pseudo function should return the area and the
perimeter of the rectangle.
Create a second procedure called L4Q2 that accepts the two sides of a rectangle. The
procedure will use the pseudo function to display the shape, the area and the perimeter.
SQL > exec L4Q2(2,2)
The area of a square size 2 by 2 is 4. It`s perimeter is 8.
SQL > exec L4Q2(2,3)
The area of a rectangle size 2 by 3 is 6. It`s perimeter is 10.
can we call functions inside the procedure and can we call procedure inside the function in sql? plz tell me sir.......i need for 2 examples regarding above problems
Yes , we are able to call function inside the procedure, but no idea about calling procedure inside the function . I had implemented it in our company.
How to create Function in pgsql that
if id=0
then insertion operation will be done
elsif id>0 and is_active=1 then
updation operation must be done
elsid id>0 and is_active=0
then update
only
is_active=0
please help
plz upload total SQL & PL SQL videos.....plz sir
Thanks!
SYNTAX FOR SQL * PLUS (other_way round)
1 SQL> CREATE OR REPLACE
2 FUNCTION CALC ( a IN number, b IN number , op IN varchar)RETURN number
3 is
4 RESULT NUMBER(10);
5 begin
6 if op ='+' then
7 result:= (a+b);
8 elsif op ='-'then
9 result :=(a-b);
10 elsif op ='*' then
11 result:= (a*b);
12 else
13 result :=(a/b);
14 end if;
15 RETURN result;
16 end;
17 /
I felt sleepy.
Sir I'm not understand
What is dual?
DUAL is virtual column in sql ,which performs only arithimatic and date operations like +,-,/* and sysdate
Dual is a default table in Oracle which contains one row and one column in a table
Dual is dummy table. it has one row and one column. Default value x. It's used to process our own data.
What is dual??