我有一个 2 表,
1- 内表
CREATE TABLE Inward
(
GoodsInwardId BIGINT DEFAULT NEXT VALUE FOR SEQ_GoodsInwardId NOT NULL UNIQUE,
GoodsInwardDate DATE NOT NULL,
InventoryId BIGINT NOT NULL,
Quantity DECIMAL(18, 4) NOT NULL
PRIMARY KEY(GoodsInwardId)
)
2- 外桌
CREATE TABLE GoodsOutward
(
GoodsOutwardId BIGINT DEFAULT NEXT VALUE FOR SEQ_GoodsOutwardId NOT NULL UNIQUE,
GoodsOutwardDate DATE NOT NULL,
InventoryId BIGINT NOT NULL,
Quantity DECIMAL(18, 4) NOT NULL
PRIMARY KEY(GoodsOutwardId)
)
在我在两个表结果中填充数据后,例如,
我的问题是,我如何总结查询,例如下面的屏幕截图。
您可以假定这两个表然后 FULL OUTER JOIN
尝试这个