Is it possible to tell a table to UPDATE from?
am 05.06.2003 15:18:17 von mojbordel
Hello,
I'm not really sure (I'm by no means an expert) but
shouldn't this be possible?
UPDATE test set i_test=item.i_itemID WHERE
test.i_ID=item.i_itemID;
I'm getting this reply:
MySQL said:
Unknown table 'item' in where clause
while of course table 'items' exists...
I use mySQL service at my webhosting, so I don't have
the control over the database.
__________________________________________________
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org
Re: Is it possible to tell a table to UPDATE from?
am 06.06.2003 09:54:33 von indrek siitan
Hi,
> I'm not really sure (I'm by no means an expert) but
> shouldn't this be possible?
> UPDATE test set i_test=3Ditem.i_itemID WHERE
> test.i_ID=3Ditem.i_itemID;
>=20
> I'm getting this reply:
> MySQL said:=20
> Unknown table 'item' in where clause
>=20
> while of course table 'items' exists...
The correct syntax is:
UPDATE test, item SET test.i_test=3Ditem.i_itemID WHERE
test.i_ID=3Ditem.i_itemID;
> I use mySQL service at my webhosting, so I don't have
> the control over the database.
Multi-table updates are implemented in MySQL 4.0 and above.
Rgds,
Indrek
--=20
Are you MySQL certified? - http://www.mysql.com/certification/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Indrek Siitan
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, The Support Guy
/_/ /_/\_, /___/\___\_\___/ Uuem=F5isa, Haapsalu, Estonia
<___/ www.mysql.com
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=3Dgcdmb-bugs@m.gmane.org