CompTIA Tech+ (FC0-U71)Data and Database FundamentalsEasy
A technician needs to add a brand-new customer record, including name, email, and phone number, into an existing Customers table using SQL. Which statement should be used?
- ADELETE
- BUPDATE
- CSELECT
- DINSERT
Show answer & explanationAnswer & explanation
Correct answer: D. INSERT
The INSERT statement is used to add new rows of data into a table. The technician would use a statement like INSERT INTO Customers (Name, Email, Phone) VALUES ('Jane','jane@example.com','555-1234') to add the new record.
Why the other options are wrong
- A. DELETE removes rows from a table, the opposite of what is needed here.
- B. UPDATE modifies values in existing rows, it does not create a new record.
- C. SELECT is used to retrieve existing data, not add new rows.
SQL INSERT
A SQL statement used to add one or more new rows of data into a table.
- Basic syntax is INSERT INTO table (columns) VALUES (values).
- Column list and value list must match in order and count.
- Different from UPDATE, which changes existing data.
Memory trick: INSERT is like adding a new card to a card catalog drawer.