Class TDeleteSqlStatement

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

SQL delete statement.

TCustomSqlStatement.getTargetTable() returns the target table of delete statement, this table also stored in the first element of TCustomSqlStatement.tables.
MySQL may contains multiple target tables, please fetch those tables from TCustomSqlStatement.joins.
If there is a FROM clause in the delete statement, all those tables in the from clause can be fetched from getReferenceJoins().
   DELETE FROM Production.ProductCostHistory
   WHERE StandardCost > 1000.00;
  

Production.ProductCostHistory can be fetched from TCustomSqlStatement.getTargetTable() or TCustomSqlStatement.tables

  DELETE FROM Sales.SalesPersonQuotaHistory
  FROM Sales.SalesPersonQuotaHistory AS spqh
  INNER JOIN Sales.SalesPerson AS sp
  ON spqh.BusinessEntityID = sp.BusinessEntityID
  WHERE sp.SalesYTD > 2500000.00;
 
Sales.SalesPersonQuotaHistory AS spqh should be fetched froom getReferenceJoins()
See Also:
  • TCustomSqlStatement.cteList
  • TCustomSqlStatement.topClause
  • TCustomSqlStatement.targetTable
  • TCustomSqlStatement.joins
  • TCustomSqlStatement.whereClause
  • TCustomSqlStatement.returningClause
  • TCustomSqlStatement.outputClause