viernes, 5 de junio de 2015

Formato de Update en SQL

UPDATE statement
Syntax

{
    UPDATE table-Name [[AS] correlation-Name]
        SET column-Name = Value
        [ , column-Name = Value} ]*
        [WHERE clause] |
    UPDATE table-Name
        SET column-Name = Value
        [ , column-Name = Value ]*
        WHERE CURRENT OF
}

where Value is defined as follows:

Expression | DEFAULT

The first syntactical form, called a searched update, updates the value of one or more columns for all rows of the table for which the WHERE clause evaluates to TRUE.

The second syntactical form, called a positioned update, updates one or more columns on the current row of an open, updatable cursor. If columns were specified in the FOR UPDATE clause of the SELECT statement used to generate the cursor, only those columns can be updated. If no columns were specified or the select statement did not include a FOR UPDATE clause, all columns may be updated.

Specifying DEFAULT for the update value sets the value of the column to the default defined for that table.

The DEFAULT literal is the only value which you can directly assign to a generated column. Whenever you alter the value of a column referenced by the generation-clause of a generated column, Derby recalculates the value of the generated column.

Fuente: http://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqlj26498.html




No hay comentarios:

Publicar un comentario