postgresql - How does this SQL query to update a row if exists, …
https://stackoverflow.com/questions/3119595/how-does-this-sql-query-to-update-a-row-if-exists-or-insert-if-not-work
WEBJun 25, 2010 · There are several queries whose effect is, if the row exists with some of the data filled in, then that row is updated with the rest of the data, and if the row does not exist, a new one is created. They look like this: INSERT INTO table_name (col1, col2, col3) SELECT %s AS COL1, %s AS COL2, %s AS COL3.
DA: 79 PA: 52 MOZ Rank: 87