--更新序号,最大值+1的方式自增
DECLARE @maxvalue INT
SELECT @maxvalue=ISNULL(MAX(SEQUENCE),0) FROM TBL_MMDM WHERE TYPE=‘Product Category‘
UPDATE TBL_MMDM
SET
@[email protected]+1,
[email protected]
WHERE TYPE=‘Product Category‘ AND SEQUENCE IS NULL
时间: 2024-10-12 18:33:29