You have below table
CREATE TABLE Inventory
(ItemID int NOT NULL PRIMARY KEY,
ProductsInStore int NOT NULL,
ProductsInWarehouse int NOT NULL)

How to create a computed column that returns the sum total of the ProductsInStore and ProductsInWarehouse values for each row ?

 Posted by Bandi on 8/29/2017 | Category: Sql Server Interview questions | Views: 2124 | Points: 40
Select from following answers:
  1. ALTER TABLE Inventory ADD TotalProducts AS ProductsInStore + ProductsInWarehouse
  2. ALTER TABLE Inventory ADD ProductsInStore - ProductsInWarehouse = TotalProducts
  3. ALTER TABLE Inventory ADD TotalProducts AS SUM(ProductsInStore, ProductslnWarehouse);
  4. ALTER TABLE Inventory ADD TotalProducts = ProductsInStore + ProductsInWarehouse
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Clydeanderson on: 1/28/2019 | Points: 10
I don't know what to do with this piece of code. Check this https://eduessayhelper.org/blog/literary-analysis-outline website and you might find the solution. I think it won't be hard.

Login to post response