sql - Insert data to tables -


I want to realize the order operation with inserting data and user input data. I have made this applause:

  order | OrderID - PK | Customer ID - FK | Order date | Order Details | OrderID - PK, FK | Manufacturer - PK, FK. Volume | Customer | Customer ID - PK | First name Last name | Address Products | Manufacturer - PK | | SuperverID - FK | | Volume | Supplier | Supplier ID - PK | Name |   

I want to use the stored procedure to insert data, but I have trouble creating T-SQL

If I understand the question correctly, then you want to know which order to insert the data in the table to ensure that it is correct ?

From your post, it seems that you enter this order:

  1. Customers / Products / Suppliers (these can all be put in any order).
  2. Order - This can only be done in the Customer Table because it requires a valid customer
  3. Order Details - Requires Entry in the Order Table and Product Table for it .

    The volume column will be on the OrderDetail table, because you can be more than one of each line item.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -