Correct Answer - Option 2 : (A) only
The correct answer is option 1.
Syntax:
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
Option A:
UPDATE EMPLOYEE
SET SALARY = SALARY*1.20
WHERE DEPT NO. IN (SELECT DID FROM DEPARTMENT WHERE DNAME='SCIENCE');
Option B:
UPDATE TABLE EMPLOYEE SET SALARY = SALARY*1.20 WHERE DNAME='SCIENCE’;
Here, DNAME is not an attribute of an employee table it's an incorrect query.
Option C:
ALTER TABLE EMPLOYEE
SET SALARY=SALARY*1.20
WHERE DEPTNO. IN (SELECT DNAME FROM DEPARTMENT WHERE DNAME ='SCIENCE’)
Here, the ALTER TABLE statement is used to add, delete, or modify columns in an existing table and used to add and drop various constraints on an existing table. Alter table is mainly used for changing table structure or constraints. Here DNAME is not an attribute of an employee table it's an incorrect query.
∴ Hence the correct answer is (A).