add
delete
make-table
update
Answer is Wrong!
Answer is Right!
The correct answer is C. make-table.
An action query is a query that changes the data in a database. The four main types of action queries are:
- Add queries add new rows to a table.
- Delete queries remove rows from a table.
- Update queries change the data in existing rows in a table.
- Merge queries combine data from two tables into a single table.
A make-table query is not an action query because it does
11.4-132.3 11.4-132.3s0-89.4-11.4-132.3zm-317.5 213.5V175.2l142.7 81.2-142.7 81.2z"/>
Subscribe on YouTube
not change the data in a database. Instead, it creates a new table based on the results of a query.
Here is a brief explanation of each option:
- Add queries add new rows to a table. For example, the following query adds a new row to the
Customers
table:
sql
INSERT INTO Customers (CustomerID, FirstName, LastName) VALUES (1000, 'John', 'Doe');
- Delete queries remove rows from a table. For example, the following query removes the row with the CustomerID of 1000 from the
Customers
table:
sql
DELETE FROM Customers WHERE CustomerID = 1000;
- Update queries change the data in existing rows in a table. For example, the following query changes the FirstName of the customer with the CustomerID of 1000 to ‘Jane’:
sql
UPDATE Customers SET FirstName = 'Jane' WHERE CustomerID = 1000;
- Merge queries combine data from two tables into a single table. For example, the following query merges the
Customers
table with the Orders
table into a new table called CustomerOrders
:
sql
MERGE INTO CustomerOrders AS CO
USING Customers AS C
ON CO.CustomerID = C.CustomerID
WHEN MATCHED THEN
UPDATE SET CO.FirstName = C.FirstName, CO.LastName = C.LastName
WHEN NOT MATCHED THEN
INSERT (CustomerID, FirstName, LastName) VALUES (C.CustomerID, C.FirstName, C.LastName);