本文介绍了如何将多个销售订单插入单个销售的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 您好我需要为单个销售添加多个销售订单怎么做? 实际上假设客户在单个账单上购买了四个项目那么什么是它的表结构?Hi I need add multiple sales orders for a single sale how to do it?Actually suppose if a customer purchases four items on single bill then what is the table structure for it?推荐答案CREATE TABLE tbl_Purchase_Dtls(PD_ID BIGINT IDENTITY(1,1),PD_CUST_ID BIGINT,PD_ITEM_ID INT,PD_ITEM_QTY INT,PD_ITEM_AMT DECIMAL(10,2),PD_BILL_NO VARCHAR(50),PD_CREATED_DT DATETIME DEFAULT GETDATE(),PD_CREATED_BY VARCHAR(100),PD_UPDATED_DT DATETIME,PD_UPDATED_BY VARCHAR(100),PD_STATUS_FLAG INT) 希望这会对你有所帮助。 干杯Hope this will help you.CheersCREATE TABLE Transaction(TrxID varchar(3),TotAmount float,TotQty int,TrxDate DateTime,CONSTRAINT pk_Transaction PRIMARY KEY (TrxID))CREATE TABLE TransactionItemWise(TrxID varchar(3),ItemNo varchar(3),ItemAmount float,ItemQty int,CONSTRAINT pk_TransactionItemWise PRIMARY KEY (TrxID,ItemNo),CONSTRAINT fk_PerOrders FOREIGN KEY (TrxID)REFERENCES Transaction(TrxID)) 这篇关于如何将多个销售订单插入单个销售的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 06-17 13:35