Update Record

TinyTables node
Database: Update Record

The Update Record node modifies existing rows in a database table that match a WHERE condition. Use it to change statuses, update timestamps, sync fields, or modify any data.

Type: Update Record / UPDATE_RECORD_V2 Color: Blue (#3B82F6) Tabs: Initialise → Configure → Test Test module: Yes (can skip)

Initialise tab: Templates

TemplateWhat it pre-fillsUse case
Update Profilename, email fields + WHERE by idUser profile changes
Change Statusstatus field + WHERE by idOrder/ticket status updates
Sync RecordMultiple fields + WHERE by external_idSyncing data from external systems

Configure tab: Fields

FieldTypeRequiredDescription
ConnectionSelectYesDatabase connection
TableSelectYesTarget table
RecordKey-value pairsYesColumn → new value mappings. Each value is an FX formula.
Where clauseFX formulaYesSQL WHERE condition identifying which rows to update

Field mapping examples

ColumnNew value
status"paid"
paid_at{{now}}
amount{{trigger.body.amount}}
updated_by"workflow"

Where clause examples

-- Update by primary key
id = '{{trigger.body.record_id}}'

-- Update by external ID (for sync)
stripe_customer_id = '{{trigger.body.data.object.customer}}'

-- Update by email
email = '{{trigger.body.email}}'

-- Update multiple rows matching a condition
status = 'pending' AND created_at < NOW() - INTERVAL '7 days'
Warning

Without a WHERE clause, UPDATE affects ALL rows in the table. Always include a specific WHERE condition. Test with Find All first to verify which rows match.

Output variables

VariableWhat it contains
{{update_record.affectedRows}}Number of rows updated
{{update_record.success}}Boolean: true if the operation succeeded

Common patterns

Status update after payment

Stripe Webhook (charge.succeeded) → Update Record (SET status='paid', paid_at=NOW() WHERE stripe_id='{{customer}}')

Mark as processed

For Each (batch of items) → Process → Update Record (SET processed=true WHERE id='{{item.id}}')

Sync from external system

Schedule → HTTP Request (fetch from API) → For Each → Update Record (sync latest data WHERE external_id='{{item.id}}')

Upsert (insert or update)

Trigger → Find One (WHERE email='{{email}}') → If-Else →
  Found: Update Record (update existing fields)
  Not found: Create Record (insert new row)
Tip

When updating a single row, always use the primary key in your WHERE clause (id = '...'). This guarantees you're updating exactly one record and not accidentally modifying others.

Note

The Update Record node auto-detects MySQL vs PostgreSQL from your connection. SQL syntax differences (like date interval syntax) are handled automatically.