Question
Question 1 Write a PL/SQL block that allows the user to input his/her name and print it with the string Your Name is: .'. Question
Question 1
Write a PL/SQL block that allows the user to input his/her name and print it with the string "Your Name is: .'.
Question 2
Write a PL/SQL block that allows the user to input a sub-total price and calculate and display the grant total after adding the tax of 13% to the sub-total.
Question 3
Write a PL/SQL Block that declares the variables in the following, ask the user to input values for the variables, and print the output:
carID of type integer.
carBrand of type varchar (20).
proDate of type Date with a default value equal to system date.
Question 4
Write a PL/SQL block that declares a record variable for Employees. Initialize two records with given IDs, Names, Departments, and Salaries and then print the output as:
EMPLOYEE ID:
EMPLOYEE Name:
EMPLOYEE Department: .
EMPLOYEE Salary:
Question 5
Write a PL/SQL Block that declares and initialize a v-array variable for five employee names, then print the content of the varray.
Question 6
Write a PL/SQL Block that declares and initialize a table variable for five employee names and assign them different ID, then print the content of the table. Print the output of using the attributes of the table.
Question 7
Write a PL/SQL block that creates a record by referencing the row type in the STUDENT table. Use the record to save a student record. Print the content of the saved records as follows:
Student ID:
Student Name:
Student Faculty: .
Student Address:
Question 8
Write a PL/SQL Block that declares the following variables:
stdFaculty referencing the faculty field in the STUDENT table.
stdTable as a table with column data referencing the record/row type in the STUDENT table.
Fill in these variables with proper values and print them on the screen.
Question 9
Write a PL/SQL block that accepts a user input representing a student id. Uses the select into clause to select the row with the entered ID from the STUDENT table saves it into variables. Then, print the record identified. Use %TYPE to identify the suitable scalar variables.
Student ID:
Student Name:
Student Faculty: .
Student Address:
Question 10
RE-WRITE (9) using predefined record variable.
Question 11
Write a PL/SQL block that accepts a user input representing a student id. Then, use the select into clause to select the name corresponding to the ID from the STUDENT table, and then do the following:
Print the name, the upper and lower case forms, and its length.
Concatenate the name with the String Name is:
Remove all the characters that follow the character m in the name and print it.
Question 12
Write a PL/SQL block that accepts a user input, which represents a value and a specific date, saves these inputs into varchar(50) variables, then do the following:
Print the variables.
Convert the value to the form $9999.9
Convert the date to the form MM/DD/YY
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started