fix: wrong table name in sql query

This commit is contained in:
Sonny
2023-12-14 01:01:22 +01:00
parent ad682faa9e
commit f3e0b8afae

View File

@@ -1,10 +1,10 @@
-- set default next id for each category based on LEAD(id) (LEAD -> Next)
UPDATE Category AS c
UPDATE category AS c
JOIN (
SELECT
id,
LEAD(id) OVER (PARTITION BY authorId ORDER BY id) AS nextCategoryId
FROM Category
FROM category
) AS n ON c.id = n.id
SET c.nextId = n.nextCategoryId;