Podcast
Questions and Answers
What is the purpose of the UPDATE command in SQL?
What is the purpose of the UPDATE command in SQL?
- To drop a table from the database
- To create a new table in the database
- To modify existing data in a table (correct)
- To delete specific rows from a table
What is the syntax of the UPDATE command to change the salary of an employee to 55000 where the employee code is 1009?
What is the syntax of the UPDATE command to change the salary of an employee to 55000 where the employee code is 1009?
- UPDATE EMPLOYEE SET ECODE = 1009 WHERE GROSS = 55000;
- UPDATE EMPLOYEE SET ECODE = 55000 WHERE GROSS = 1009;
- UPDATE EMPLOYEE SET GROSS = 1009 WHERE ECODE = 55000;
- UPDATE EMPLOYEE SET GROSS = 55000 WHERE ECODE = 1009; (correct)
What is the effect of the command UPDATE EMPLOYEE SET GROSS = GROSS + 1000;
What is the effect of the command UPDATE EMPLOYEE SET GROSS = GROSS + 1000;
- Deletes the salary of each employee
- Sets the salary of each employee to 1000
- Decreases the salary of each employee by 1000
- Increases the salary of each employee by 1000 (correct)
What is the purpose of the DELETE command in SQL?
What is the purpose of the DELETE command in SQL?
What is the effect of the command DELETE FROM EMPLOYEE WHERE GRADE = 'A1';
What is the effect of the command DELETE FROM EMPLOYEE WHERE GRADE = 'A1';
What is the effect of the command DELETE FROM EMPLOYEE;
What is the effect of the command DELETE FROM EMPLOYEE;
What is the purpose of the DROP TABLE command in SQL?
What is the purpose of the DROP TABLE command in SQL?
What is the syntax of the DROP TABLE command to drop the EMPLOYEE table?
What is the syntax of the DROP TABLE command to drop the EMPLOYEE table?
What is the effect of the command UPDATE EMPLOYEE SET GROSS = 58000, GRADE='B2' WHERE ECODE = 1009;
What is the effect of the command UPDATE EMPLOYEE SET GROSS = 58000, GRADE='B2' WHERE ECODE = 1009;
What is the effect of the command UPDATE EMPLOYEE SET GROSS = GROSS * 2 WHERE GRADE='A1' OR GRADE='A2';
What is the effect of the command UPDATE EMPLOYEE SET GROSS = GROSS * 2 WHERE GRADE='A1' OR GRADE='A2';