Subject | Re: [firebird-support] Updates with select XXX from TABLE |
---|---|
Author | Martijn Tonies |
Post date | 2004-10-14T10:20:05Z |
Hello Jan,
doing :-)
Try:
update table1
set id = (select id from table2 where id in (1, 2, 3) )
Do note that you're updating all "id"s in Table1.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> Is it possible to use more difficult updates by FB?Well, yes you can use SELECTs, but that's not what you're
>
> Something like:
>
> update TABLE1 set id=TABLE2.id from TABLE2 where id in (1,2,3);
>
> I mean useing selects in updates and inserts..
doing :-)
Try:
update table1
set id = (select id from table2 where id in (1, 2, 3) )
Do note that you're updating all "id"s in Table1.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com