Inventory Design-Example of inventory table

Source: Internet
Author: User

Create Table Stockpile/* database table */
(
Stockpile_id int identity (1, 1) not null,/* inventory number, primary key */
Dept_id int not null,/* Department of the product, foreign key (refer to the dept table )*/
Storehouse_id int not null,/* Warehouse, foreign key (refer to the sotrehouse table )*/
Product_id int not null,/* product number, foreign key (refer to the product table )*/
Firstenterdate datetime not null,/* The first import time of the product */
Lastleavedate datetime null,/* the last time this item was delivered */
Quantity int not null,/* quantity */
Price money not null/* weighted price */
/* When lastleavedate is null, this product has never been sold */
)

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.