--- title: "update()" slug: "basic-db-update-list" updated: 2026-08-12T13:38:31Z published: 2026-08-12T13:38:31Z canonical: "docs.lobstersoftware.com/basic-db-update-list" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # update() This function executes an update statement **a** on database **b**. You can use placeholders in the update statement that are filled with values from list ***c***. Details can be found in the example below. The function returns the number of changed database table rows. If **d** is "*true"*, the return value is "*-1"* in case of an SQL error. ## Parameters | Parameter | Description | | --- | --- | | a | The update statement. | | b | The database alias. | | c | The name of the list. | | d | (optional) If *true*, SQL errors coming from the database are ignored. Default: *false*. | ## Example We use the following Function chain. First, we fill a list with the update parameters and then use them in the placeholders of the update statement. ```plaintext add to list(a,b,c) a Value: 12463,file_test.csv b Value: updatelist c Value: , update (sql-stmt a, alias b, list c, ignore error d) a Value: update dw_log set file_name=@2:s@ where dw_job=@1:l@ b Value: hub c Value: updatelist d Value: ``` The executed update statement here is *update dw_log set file_name='file_test.csv' where dw_job=12463* The syntax for the parameters is *@parameternumber:parametertype@*. The parameter number is the position of a value in the list and the parameter type **s** stands for *String* and **I** for *Integer*. For details about the data types, see the documentation of class [DefaultSQLCron](/v1/docs/en/default-sql-cron)*.* Function chains in Lobster consist of sequences of functions that are used to define conditions or to process data. The possibility of encapsulating them in macros and reusing them allows for central maintenance and compact use. Changes to a macro affect all profiles with that macro. Function chains can be determined both system-wide and client-specific.