Runs an INSERT, UPDATE, or DELETE statement.
class JDBC method .executeUpdate()
JDBC is the Apps Script service.
.executeUpdate() is the method name you will see after a dot in your code.
What it does
Why it's used
- INSERT or UPDATE records from sheet changes.
- Push approved rows back to your system of record.
Common errors
- Forgetting parentheses on executeUpdate. Write JDBC.executeUpdate(), not JDBC.executeUpdate or executeUpdate by itself.
- Skipping dots between chained calls. Each step needs a dot, like JDBC.executeUpdate().
- Adding spaces where they do not belong. Write JDBC.executeUpdate(), not JDBC .executeUpdate(), JDBC.executeUpdate (), or JDBC . executeUpdate().
- Wrong capitalization. Use JDBC and executeUpdate, not jdbc or executeupdate.
Explore
Related methods
-
.executeQuery()
Runs a SELECT query and returns the result set.
-
.createStatement()
Creates a SQL statement to run against the database.
-
.getConnection()
Opens a connection to an external SQL database.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.
Related blog posts
Written guides about JDBC.executeUpdate().