adplus-dvertising
frame-decoration

Question

Which of the following relation updates all instructors with salary over $100,000 receive a 3 percent raise, whereas all others receive a 5 percent raise.

a.

UPDATE instructor
SET salary = salary * 1.03
WHERE salary > 100000;
UPDATE instructor
SET salary = salary * 1.05
WHERE salary <= 100000;

b.

UPDATE instructor
SET salary = salary * 1.05
WHERE salary < (SELECT avg (salary)
FROM instructor);

c.

UPDATE instructor
SET salary = CASE
WHEN salary <= 100000 THEN salary * 1.05
ELSE salary * 1.03
END

d.

Both a and c

Posted under DBMS

Answer: (d).Both a and c

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following relation updates all instructors with salary over $100,000 receive a 3 percent raise, whereas all others receive a 5 percent raise.

Similar Questions

Discover Related MCQs

Q. SELECT *
FROM student JOIN takes USING (ID);

The above query is equivalent to

Q. In SQL the statement select * from R, S is equivalent to

Q. For the view Create view instructor_info as

SELECT ID, name, building
FROM instructor, department
WHERE instructor.dept name= department.dept name;

If we insert tuple into the view as insert into instructor info values (’69987’, ’White’, ’Taylor’);

What will be the values of the other attributes in instructor and department relations?

Q. A _________ consists of a sequence of query and/or update statements.

Q. Which of the following makes the transaction permanent in the database ?

Q. In order to undo the work of transaction after last commit which one should be used ?

Q. Consider the following action:

TRANSACTION.....
Commit;
ROLLBACK;

What does Rollback do?

Q. In case of any shut down during transaction before commit which of the following statement is done automatically?

Q. In order to maintain the consistency during transactions database provides

Q. Which of the following is used to get back all the transactions back after rollback ?

Q. ______ will undo all statements up to commit?

Q. Domain constraints, functional dependency and referential integrity are special forms of _________

Q. Create index studentID_index on student(ID);
Here which one denotes the relation for which index is created ?

Q. Values of one type can be converted to another domain using which of the following ?

Q. CREATE DOMAIN YearlySalary NUMERIC(8,2)
CONSTRAINT salary VALUE test __________;

In order to ensure that an instructor’s salary domain allows only values greater than a specified value use:

Q. In contemporary databases the top level of the hierarchy consists of ______ each of which can contain _____

Q. The database administrator who authorizes all the new users, modifies database and takes grants privilege is

Q. Which of the following is a basic form of grant statement ?

Q. Which of the following is used to access the database server at time of executing the program and get the data from the server accordingly ?

Q. Which of the following header must be included in java program to establish database connectivity using JDBC ?