Skip to content
Advertisement

Update specific column within the same table and add limit – PostgreSQL

I would like to update the value of a column within the same table by transforming its former value, but I would like to first test it with the first 10 data according to its created date.

I am getting this error though

Here is my sample code:

Any syntax that would make this work?

Advertisement

Answer

Hmmm . . . I don’t see why you are using a self-join. If you just want to delete the top 10 entities, you can use:

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