Use CASE statement in PL SQL block, where take a character as input from the user and print Excellent if grade is A Very Good if grade is B Good if grade is C Fair if grade is D Fail if grade is F
Q: Database design Objectives: To understand and be able to write simple SQL queries Instruction:…
A: select last_name, salary from employees where salary > xyz; select last_name, department_id…
Q: Topic: SQL StoredProc Create a stored proc that returns all the students from schools with revenue…
A: Let's see the answer
Q: Create a function name BALANCE that returns the status of outstanding amount for each customer. Use…
A: Required : Function name : BALANCE It returns the status of outstanding amount for each customer. IF…
Q: Write a PL/SQL code to print 'PASS' if the student has scored above 40. Choose an answer A declare…
A: C is the correct option Declare m number:= 80;begin if m>40 dbms_output.put_line('Pass') ; end…
Q: emp (eno, ename, bdate, title, salary, dno) proj (pno, pname, budget, dno) dept (dno, dname, mgreno)…
A: In order to return the project number and name for the projects with a budget greater than $100,000,…
Q: Pl/sql Program to increase the salary of employee whose id is 400 based on the following conditions…
A: here we have given a Pl/sql Program to increase the salary of employee whose id is 400 based on, If…
Q: in sql The PL/SQL block starts with the _____ section. Select one: a. DECLARE b. BEGIN c. IS d.…
A: The SQL block always start with the DECLARE section. All the remaining options are incorrect.
Q: Difference between procedure and function in SQL
A: SQL functions and procedures are database objects designed to streamline and improve the…
Q: True or FalseString comparisons in SQL are case sensitive.
A: Explanation: The data in DBMS is stored and retrieved by using a specific language called SQL. DBMS…
Q: start end 1 8 6
A: -- sql-- select start only if x1 = x2 - 1 is satisfied-- select end as max if x2 = x1 + 1 is…
Q: Employees (EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE, JOB_ID, SALARY,…
A: Here, Query instruction is given.
Q: In SQL Server, character data types may be distinguished as follows: NVARCHAR, NVARCHAR, and…
A: Introduction: A SQL developer must choose what information will be kept in each column before…
Q: USE NORTHWIND DATABASE Write a SELECT statement using the CASE function. The statement returns two…
A: sql select statement for above question is shown in step2
Q: Write a script to create a PL/SQL procedure called findSal that displays the doctor’s salary and…
A: A procedure is created with the CREATE OR REPLACE PROCEDURE statement. The simplified syntax for the…
Q: PL/SQL Question I need to build pl/sql block that prompts a user for the number of visitors each…
A: Answers:- Here's a sample PL/SQL block that prompts the user for the number of visitors for the past…
Q: By default, data returned by the SQL SELECT statement is in descending order. a. True b.…
A: Please find the answer below :
Q: Write SQLSQL statements for following: Student( Enrno, name, courseId, emailId, cellno)…
A: We need to create tables for Student and Course And we need to insert values into these tables.…
Q: Task 2: Write a function that returns how old a book is Published before 2000 ->Book X by author Y…
A: SELECT * FROM ( SELECT CONCAT(a.fname, ' ', a.lname), b.title,…
Q: Please develop PL/SQL program that asks for a radius of a circle. After user enters a radius number,…
A: Syntax to implement IF statement: IF condition THEN statements; ELSEIF condition THEN…
Q: ISBN Title Author 12345678 The Hobbit J.R.R. Tolkien 45678912 DaVinci Code Dan Brown Your student ID…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: What method of Statement is used if you want to execute DELETE SQL statement?
A: Answer:
Q: SQL code for: Create a stored procedure “setRelocationFee” to set the relocation fee for a given…
A: In this have to create a stored procedure “setRelocationFee".
Q: Write SQL Query that display department id and department name that employs fewer than five…
A: Given: Write SQL Query that display department id and department name that employs fewer than five…
Q: In what situations might the SOUNDEX function be useful in SQL when querying text data?
A: The SOUNDEX function in SQL is useful in situations where you need to perform approximate matching…
Q: sql queries Employees (EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE, JOB_ID,…
A: Concept used:- subqueries query within query is known as sub query where inner query act as input…
Q: calculate the overtime hours using if then and end if .
A: SQL> SQL> -- Calculating overtime hours with IF. SQL> set echo on SQL> DECLARE 2…
Q: use the following statement to Write a PL/SQL Function that accepts 4 parameters, 2 strings…
A: DECLAREStudent1 varchar2(32767);Student2 varchar2(32767);S1Marks number;S2Marks number;c…
Q: _ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE, JOB_ID, SALARY, COMMISSION_PCT,…
A: Employees(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE,JOB_ID, SALARY,…
Q: write SQL code that involve calculation by using if else statement
A: Syntax- IF (Expression ) BEGIN -- if expression is true True Statements; END ELSE BEGIN…
Q: **In SQL** Write a SELECT statement that returns these columns: InstructorDept The DepartmentName…
A: Please refer to the following step for the complete solution to the problem above.
Q: Write the following SQL Statements: Write a SELECT statement that returns one row for each customer…
A: Answer: We have written SQL command and our guidelines is answer the first three question from the…
Use CASE statement in PL SQL block, where take a character as input from the user and print
Excellent if grade is A
Very Good if grade is B
Good if grade is C
Fair if grade is D
Fail if grade is F
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
- SBN Title Author 12345678 The Hobbit J.R.R. Tolkien 45678912 DaVinci Code Dan Brown Your student ID DBS311 Your Name use the following statement to Write a PL/SQL Function that accepts 4 parameters, 2 strings representing students names, and 2 integers representing the marks they received in DBS311. The function will determine which student had the higher mark and return the name of the student. If the marks were the same, then return the word "same" and return "error" if an error occurs or the calculation can not be determined.write SQL code that involve calculation by using if else statementINFO 2303 Database Programming Assignment # : PL/SQL Procedure & Function Practice Note: PL/SQL can be executed in SQL*Plus or SQL Developer or Oracle Live SQL. Write a script to create a PL/SQL procedure called findSal that displays the doctor’s salary and bonus after passing in the doc_id into the procedure. For example, if you pass in doc_id 504, you will get the following output. execute findSal(504) The salary for Dr.Cotner (504) is: 11500 The bonus is: 7500 PL/SQL procedure successfully completed.
- Student Name: Student Number: Write a PL/SQL Program to do the following Your Program should request the user to enter the temperature. Then based on the users input your program should display the following messages a. Print "Hot" if the temperature is above 80 degrees, b. Print "Nice Weather" if it's between 50 and 80 degrees, c. Print "cold" if it is less than 50 degrees Test 40, 55 and 85 as inputs; Guideline: Create a unique code Add Comments to the program ● Take clear screen shots of the program source code and the outputs Explain the code block briefly You must submit the code as one .sql file and paste all the screenshots in the Word document and upload it to Moodle before deadline. 99+ DELLSQL code for: Create a stored procedure “setRelocationFee” to set the relocation fee for a given employee. If the employee’s office is in San Francisco, the relocation fee is $10000; if the employee’s office is in Boston, the relocation fee is $8000; if the employee’s office is in London, the relocation fee is $20000; if the employee works in other offices, the relocation fee is $15000. Below is a sample statement to test your stored procedure. set @employeeID = 1501; call setRelocationFee(@employeeID, @relocationfee); select @employeeID, @relocationfee; Having this database CREATE TABLE `offices` ( `officeCode` varchar(10) NOT NULL, `city` varchar(50) NOT NULL, `phone` varchar(50) NOT NULL, `addressLine1` varchar(50) NOT NULL, `addressLine2` varchar(50) DEFAULT NULL, `state` varchar(50) DEFAULT NULL, `country` varchar(50) NOT NULL, `postalCode` varchar(15) NOT NULL, `territory` varchar(10) NOT NULL, PRIMARY KEY (`officeCode`) ) ENGINE=InnoDB DEFAULT…**In SQL** Write a SELECT statement that returns these columns: InstructorDept The DepartmentName column from the Departments table for a related instructor LastName The LastName column from the Instructors table FirstName The FirstName column from the Instructors table CourseDescription The CourseDescription column from the Courses table CourseDept The DepartmentName column from the Departments table for a related instructor Return one row for each course that’s in a different department than the department of the instructor assigned to teach that course. (Hint: You will need to join the Departments table to both the Instructors table and the Courses table, which will require you to use table aliases to distinguish the two tables.)
- USE NORTHWIND DATABASE Write a SELECT statement using the CASE function. The statement returns two columns basedon how many orders the customer has in the database. The first column is the customer name andthe second column, Membership Type, is based on which case applies to the customer:If the customer has more than 25 orders they are a Diamond Customer.If the customer has more than 15 orders they are a Gold Customer.If the customer has more than 10 orders they are a Silver Customer.If the customer has more than 5 orders they are an Iron Customer.Otherwise the customer is a Valued Customer.Please develop PL/SQL program that asks for a radius of a circle.After user enters a radius number, the program then calculates 1. Circumference and 2. Area of a circle, then prints both as follows: You entered radius as 5The circumference is 31.4159The area is 78.5398 If the area is less than 50 then print 'Please enter bigger radius'.Otherwise print 'Your radius is Ok'. Declare variables for circumference and area in such a way that the result would be rounded to 4 decimal places after the dotWhat method of Statement is used if you want to execute DELETE SQL statement?
- ISBN Title Author 12345678 The Hobbit J.R.R. Tolkien 45678912 DaVinci Code Dan Brown Your student ID DBS311 Your Name use the following statement to Write the PL/SQL code to create a procedure that accepts a product price and increases it by 10%Difference between procedure and function in SQLPL/SQL Question I need to build pl/sql block that prompts a user for the number of visitors each day for the past 5 days and then displays the average number of visitors per day. For example; day 1: 19 day 2: 21 day 3: 23 ... The avg number of visitors is: ___ like this.
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)