Your Orders table is defined as follow: CREATE TABLE Orders ( OrderID Int IDENTITY (1,1) NOT NULL, SalesPersonID Int NOT NULL, RegionID Int NOT NULL, OrderDate Datetime NOT NULL, OrderAmount Int NOT NULL) The table is becoming too large to manage. You must delete all sales that are more than three years old. Which query will accomplish the desired result?
A. DELETE FROM Orders WHERE OrderDate DATEADD(YY,-3,GETDATE())
B. DELETE FROM Orders WHERE OrderDate DATEADD(YY,3,GETDATE())
C. DELETE FROM Orders WHERE OrderDate GETDATE(), -3
D. DELETE FROM Orders WHERE OrderDate GETDATE(),+3
Answer:A
Your Orders table is defined as follow: CREATE TABLE Orders ( OrderID Int IDENTITY (1,1) NOT NULL, SalesPersonID Int NOT NULL, RegionID Int NOT NULL, OrderDate Datetime NOT NULL, OrderAmount Int NOT NULL) The table is becoming too large to manage. You must delete all sales that are more than three years old. Which query will accomplish the desired result?
A. DELETE FROM Orders WHERE OrderDate DATEADD(YY,-3,GETDATE()) B. DELETE FROM Orders WHERE OrderDate DATEADD(YY,3,GETDATE()) C. DELETE FROM Orders WHERE OrderDate GETDATE(), -3 D. DELETE FROM Orders WHERE OrderDate GETDATE(),+3