Skip to content
Advertisement

how to update multiple rows in a single column to use a different time

I have a table as follows

i want to increment the datetime by 1minute for each id

so the outcome should look like

how can i achieve this in an update statement all at once? since i have like 100 rows

Advertisement

Answer

You can use an updatable CTE:

db<>fiddle

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement