March 2001
Intermediate to advanced
640 pages
14h 9m
English
| 1: | What is wrong with the following statement?
DELETE * FROM customer_demo |
| A1: | This statement should not be using the '*'. In addition, the FROM keyword is optional. The correct syntax of this statement is
DELETE FROM customer_demo Or DELETE customer_demo Remember that this would delete all the data in the table. |
| 2: | What is wrong with the following statement?
UPDATE customer_demo (
'John', 'smith', 34)
|
| A2: | Answer: This statement mixes the UPDATE command with the INSERT command. To UPDATE values into the customer_demo table, you use the following syntax for an update:
UPDATE customer_demoSET Fname = 'John',
Lname = 'smith'
age = 34And for an insert, the following syntax would be used: INSERT INTO customer_demo (Fname, Lname, Age) Values('John', ... |
Read now
Unlock full access