Explain how you would delete or update rows in Salesforce using only SELECT and INSERT operations.
Provide a PostgreSQL statement that reads the Salesforce contact snapshot and inserts a change plan representing required updates or deletions. Do not directly modify the snapshot table.
plan_id, contact_id, operation, replacement_status, and replacement_phone.contact_id ascending.| Column | Type | Description |
|---|---|---|
| contact_idPK | INT | Salesforce Contact identifier |
| status | VARCHAR(20) | Current Contact status |
| phone | VARCHAR(20) | Current phone number |
| is_deleted | BOOLEAN | Whether Salesforce marked the Contact as deleted |
| Column | Type | Description |
|---|---|---|
| plan_idPK | INT | Change plan identifier |
| contact_id | INT | Referenced Salesforce Contact identifier |
| operation | VARCHAR(10) | Planned operation, UPDATE or DELETE |
| replacement_status | VARCHAR(20) | Status to apply for an update |
| replacement_phone | VARCHAR(20) | Phone number to apply for an update |