Open topic with navigation

TIBCO ActiveSpaces® - Enterprise Edition 5.0.0

# The SQL UPDATE Statement

An SQL UPDATE statement changes the values of columns in the existing rows of a table. If the UPDATE activity is successful, it returns the number of rows changed in the table.

If the UPDATE activity is not successful, 0 is returned as the number of rows changed in the table.

Transactions are not supported for UPDATE statements and you cannot create an UPDATE statement from a transacted session.

Since transactions are not supported with UPDATE, if an error occurs while performing a row update, any rows already updated remain changed and the update is not rolled back.

## Syntax

    UPDATE <table_name> [ AS <alias> ] <SET clause> [ <WHERE clause> ]

Where

- `table_name`: The name of the table containing the rows to be updated.
- `alias`: A temporary name for the table that is used to make the table name more readable.
- `SET clause`: Begins with the keyword 'SET' and contains a comma-separated list of assignments where column names are set to value expressions. For example,
  - SET column1 = value1

  - SET column1 = value1, column2 = value2

  - SET (column1, column2) = (value1, value2)

- WHERE clause: An expression that starts with the keyword 'WHERE' and results in a boolean value that indicates whether a row should be updated. If omitted, all rows of the table are updated. For more information, see The WHERE Clause.

Subtopics

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO ActiveSpaces® - Enterprise Edition

Copyright © 2009-2025. Cloud Software Group, Inc. All Rights Reserved.