MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
You are required to update the phone number for only the DesignerID “SMI01” in the “Designer” table. Which of these would successfully do that?
A
UPDATE Designer SET PhoneNo = ‘01224123456’
B
UPDATE Designer (PhoneNo) VALUES (’01224123456’)
C
UPDATE Designer SET PhoneNo = ‘01224123456’ WHERE DesignerID = ‘SMI01’
D
UPDATE PhoneNo = ‘01224123456’ FROM Designer WHERE DesignerID = ‘SMI01’
Explanation: 

Detailed explanation-1: -The UPDATE statement is used to modify the existing records in a table.

Detailed explanation-2: -Q16) Which of the following statement(s) is/are true for UPDATE in SQL? In UPDATE command, you must list what columns to update with their new values (separated by commas). To update multiple targeted records, you need to specify UPDATE command using the WHERE clause.

Detailed explanation-3: -The correct answer is Select, where, group by, having.

Detailed explanation-4: -An UPDATE statement without a WHERE clause will update all the rows of the table.

There is 1 question to complete.