MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
I want to change the address and postcode of customerID 6 in the customer table. Which SQL statement would be correct to use?
A
UPDATE customerSET address1="37 Clarence Avenue” AND postcode = “G12 4FD"WHERE customerID = 6
B
UPDATE customersSET address1="37 Clarence Avenue", postcode = “G12 4FD"WHERE customerID = 6
C
UPDATE customerSET address1="37 Clarence Avenue", SET postcode = “G12 4FD"WHERE customerID = 6
D
UPDATE customerSET address1="37 Clarence Avenue", postcode = “G12 4FD"WHERE customerID = 6
Explanation: 

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

Detailed explanation-2: -The WHERE clause should be changed to use an outer join to display the desired results.

Detailed explanation-3: -18. Which of the following commands is used to change the rows that already exist in a table? Answer: C. UPDATE is a DML statement which is used to modify the column values in a table.

Detailed explanation-4: -UPDATE Command: Incrementing Integer Value When we have to update any integer value in a table, then we can fetch and update the value in the table in a single statement. As you can see, we have used age = age + 1 to increment the value of age by 1.

There is 1 question to complete.