1.1

Table Of Contents
Dropping or adding triggers on the target table of the update invalidates the update statement.
Example
-- Change the ADDRESS and SINCE fields to null for all
customers with ID greater than 10.
UPDATE TRADE.CUSTOMERS
SET ADDR=NULL, SINCE=NULL
WHERE CID > 10;
-- Set the ADDR of all customers to 'VMWare' where the current
address is NULL.
UPDATE TRADE.CUSTOMERS
SET ADDR = 'VMWare'
WHERE ADDR IS NULL;
// Increase the QTY field by 10 for all rows of SELLORDERS
table.
UPDATE TRADE.SELLORDERS
SET QTY = QTY+10;
-- Change the STATUS field of all orders of SELLORDERS
table to DEFAULT ( 'open') , for customer ID = 10
UPDATE TRADE.SELLORDERS
SET STATUS = DEFAULT
WHERE CID = 10;
SQL Queries
Query
Create a virtual table based on existing tables or constants built into tables.
Syntax
{
( Query )
|
SelectExpression | VALUES Expression
}
Note: Using Union, Intersect, or Except is not supported in this release of SQLFire, even though SQLFire
does not throw a syntax error. See SQL Language Limitations on page 687.
Description
A query creates a virtual table based on existing tables or constants built into tables.
Examples
-- a Select expression
SELECT * FROM TRADE.CUSTOMERS
-- a subquery
SELECT * FROM TRADE.CUSTOMERS C WHERE EXISTS (SELECT * FROM
TRADE.PORTFOLIO F WHERE F.CID = C.CID AND TID =? AND F.QTY
>927)
-- a values expression
VALUES (1,2,3
517
SQL Language Reference