Retail_manager/RMData/dbo/Tables/Inventory.sql

10 lines
336 B
Transact-SQL

CREATE TABLE [dbo].[Inventory]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY,
[ProductId] INT NOT NULL,
[Quantity] INT NOT NULL DEFAULT 1,
[PurchasePrice] MONEY NOT NULL,
[PurchaseDate] DATETIME2 NOT NULL DEFAULT getutcdate(),
CONSTRAINT [FK_Inventory_ToProduct] FOREIGN KEY (ProductId) REFERENCES Product(Id)
)