Þessi vafri er ekki lengur studdur.
Uppfærðu í Microsoft Edge til að nýta þér nýjustu eiginleika, öryggisuppfærslur og tæknilega aðstoð.
You want to insert data from the Store.Product table into an existing table named Sales.Offer. Which statement should you use?
INSERT INTO Sales.Offer SELECT ProductID, Name, Price*0.9 FROM Store.Product;
SELECT ProductID, Name, Price*0.9 FROM Store.Product INTO Sales.Offer;
INSERT INTO Sales.Offer (ProductID, Name, Price*0.9) VALUES (Store.Product);
You need to determine the most recently inserted IDENTITY column in the Sales.Invoice table. Which statement should you use?
SELECT SCOPE_IDENTITY() FROM Sales.Invoice;
SELECT IDENT_CURRENT('Sales.Invoice');
SELECT NEXT VALUE FOR Sales.Invoice;
You must increase the Price of all products in category 2 by 10%. Which statement should you use?
UPDATE Store.Product SET Price = Price * 1.1, Category = 2;
UPDATE Store.Product SET Price = Price * 1.1 WHERE Category = 2;
SELECT Price * 1.1 INTO Store.Product FROM Store.Product WHERE Category = 2;
You must answer all questions before checking your work.
Var þessi síða gagnleg?
Þarftu hjálp með þetta efni?
Viltu prófa að nota Ask Learn til að skýra eða leiðbeina þér í gegnum þetta efni?