Class TUpdateSqlStatement

All Implemented Interfaces:
IRelation, Visitable, Iterator<TSourceToken>

SQL update statement.

TCustomSqlStatement.getTargetTable() returns the target table, this table can also be fetched from the first element of TCustomSqlStatement.tables.
If there is a from clause in update statement, TCustomSqlStatement.joins returns all the tables in the from clause.
TCustomSqlStatement.getResultColumnList() returns assignment in set clause.
 UPDATE dbo.Table2
 SET dbo.Table2.ColB = dbo.Table2.ColB + dbo.Table1.ColB
 FROM dbo.Table2
 INNER JOIN dbo.Table1
 ON (dbo.Table2.ColA = dbo.Table1.ColA);
Table: dbo.Table2 can be fetched from TCustomSqlStatement.getTargetTable() or TCustomSqlStatement.tables
set clause: dbo.Table2.ColB = dbo.Table2.ColB + dbo.Table1.ColB, TCustomSqlStatement.getResultColumnList()
from clause: dbo.Table2 inner join , TCustomSqlStatement.joins
See Also:
  • TCustomSqlStatement.cteList
  • TCustomSqlStatement.topClause
  • TCustomSqlStatement.targetTable
  • TCustomSqlStatement.outputClause
  • TCustomSqlStatement.joins
  • TCustomSqlStatement.resultColumnList
  • TCustomSqlStatement.whereClause
  • TCustomSqlStatement.returningClause