--- On Wed, 11/21/07, Andreas <maps(dot)on(at)gmx(dot)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 Things
WHERE Inventory.thing_fk = Things.thing_id
AND Things.color = 'red';
IIRC, Joe Celko referrers to this syntax as "T-SQL".
Regards,
Richard Broersma Jr.