PostgreSQL: Insert – Update or Upsert – Merge using writable CTE

In this post, I am sharing a demonstration on how to write merge statement using CTE of PostgreSQL. PostgreSQL 9.1 has a new feature to write CTE and to use the CTE you can also merge INSERT/UPDATE in an expression. The merge statement is always a discussion point for Database Developers of MySQL/PostgreSQL. Below is … Continue reading PostgreSQL: Insert – Update or Upsert – Merge using writable CTE