--- On Wed, 11/21/07, Andreas <maps.on@gmx.net> wrote:>
> UPDATE inventory
> SET number = 0
> WHERE thing_fk IN (SELECT thing_id FROM things WHERE color
> = 'red')
This is a perfectly acceptable ANSI-SQL update statement.
Here is non-ANSI update statement that you are probably after:
UPDATE Inventory SET number = 0 FROM ThingsWHERE Inventory.thing_fk = Things.thing_id AND Things.color = 'red';
IIRC, Joe Celko referrers to this syntax as "T-SQL".
Regards,
Richard Broersma Jr.