Which statement should you use?

You have a table named Orders. OrderID is defined as an IDENTITY(1,1). OrderDate has a default
value of 1.

You need to write a query to insert a new order into the Orders table for CustomerID 45 with today’s
date
and a cost of 89.00. Which statement should you use?

You have a table named Orders. OrderID is defined as an IDENTITY(1,1). OrderDate has a default
value of 1.

You need to write a query to insert a new order into the Orders table for CustomerID 45 with today’s
date
and a cost of 89.00. Which statement should you use?

A.
INSERT INTO Orders
(CustomerId, OrderDate, Cost)
VALUES (45, DEFAULT, 89.00);

B.
INSERT INTO Orders
(OrderID, CustomerId, OrderDate, Cost)
VALUES (1, 45, DEFAULT, 89.00);

C.
INSERT INTO Orders
(CustomerId, OrderDate, Cost)
VALUES (45, CURRENT_TIMESTAMP, 89.00);

D.
INSERT INTO Orders
(OrderID, CustomerId, OrderDate, Cost)
VALUES (1, 45, CURRENT_TIMESTAMP, 89.00);



Leave a Reply 0

Your email address will not be published. Required fields are marked *