Loading topic
SELECT, INSERT, UPDATE, and DELETE statements. You should also understand joins, primary keys, unique constraints, subqueries, aliases, and the basics of transactions.2 min readSELECT, INSERT, UPDATE, and DELETE statements, joins, primary keys, aliases, and transactions. The examples use PostgreSQL 15 or later, which introduced MERGE.2 min readSELECT, INSERT, UPDATE, and DELETE statements, joins, primary keys, and transactions. It also assumes that you have the inventory and inventory_updates tables from the previous chapter.3 min readSELECT, INSERT, UPDATE, and DELETE statements, joins, primary keys, and transactions. You should also be comfortable using table aliases and subqueries.2 min readSELECT, INSERT, UPDATE, and DELETE, joins, primary keys, and simple transactions. You should also understand table aliases and WHERE conditions.2 min readSELECT, joins, aggregates, primary keys, and transactions. This chapter focuses on one important MERGE rule: each target row may be matched by at most one source row.3 min readSELECT, INSERT, UPDATE, and DELETE, joins, primary keys, unique constraints, aliases, subqueries, and basic transactions. PostgreSQL added MERGE in version 15. PostgreSQL has supported INSERT ... ON CONFLICT since version 9.5.3 min readMERGE syntax from earlier chapters. The examples use an inventory target table with a primary key on product_id.3 min readSELECT, INSERT, UPDATE, and DELETE statements, joins, primary keys, and transactions. You should also understand that a MERGE compares rows from a source relation with rows in a target table using an ON condition.3 min readMERGE clauses. This chapter focuses on PostgreSQL 17 features that let a MERGE statement report what it changed.2 min readMERGE syntax. It also assumes that inventory is the target table and inventory_updates is the source table from earlier examples.2 min read