如果多个用户同时运行以下查询会发生什么?
INSERT INTO "Retail"."Attributes"("AttributeId","AttributeCode","AttributeName")
VALUES(nextval('"Retail"."CompoundUnits_CompoundUnitId_seq"'::regclass),'COL','Color');
INSERT INTO "Retail"."AttributeDetails"
("AttributeId","AttributeDetailCode","AttributeDetailName")
VALUES
(
currval('"Retail"."CompoundUnits_CompoundUnitId_seq"'::regclass), 'COL-Red', 'Color Red'
),
(
currval('"Retail"."CompoundUnits_CompoundUnitId_seq"'::regclass), 'COL-Blu', 'Color Blue'
),
(
currval('"Retail"."CompoundUnits_CompoundUnitId_seq"'::regclass), 'COL-Gre', 'Color Green'
);
这是否像 SQL SERVER 的 SCOPE_IDENTITY() 一样可靠?任何建议将不胜感激。