PLSQL Assignment 1
PLSQL Assignment 1
Write a PL/SQL block to declare a variable named "salary" of type NUMBER and
assign a value of 5000 to it. Display the value of the salary variable.
2. Write a PL/SQL block to declare two variables, "length" and "width", both of
type NUMBER. Assign values of 10 and 5 to the variables, respectively. Calculate
and display the area of a rectangle using these variables.
4. Write a PL/SQL block to declare two variables, "num1" and "num2", both of type
NUMBER. Prompt the user to enter values for num1 and num2. Swap the values of the
variables and display the new values.
5. Write a PL/SQL block to declare a variable named "emp_count" of type NUMBER and
initialize it to 0. Retrieve the count of employees from the HR schema's
"employees" table and assign it to the "emp_count" variable. Display the value of
"emp_count".