Skip to content
Advertisement

UPDATE syntax in SQLite

I need to know if I can do this in an UPDATE statement:

Or similar syntax. I’m using SQLite.

Note:

Nobody understands me, I just want to know if it is possible to SET separate fields to separate values. That’s all.

Advertisement

Answer

There is a (standard SQL) syntax that is similar to what you propose but as far as I know, only Postgres has implemented it:

Tested (for the infidels) in: SQL-Fiddle


This also works in Postgres:


This works in Postgres and SQL-Server:


and as @JackDouglas commented, this works in Oracle:

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