At 22:43 -0700 3/18/03, Lai wrote:
>Hi.
>
>Here is my table design, my query and the error:
>
>mysql> describe poor;
>+--------+----------------+------+-----+---------+----------------+
>| Field | Type | Null | Key | Default | Extra |
>+--------+----------------+------+-----+---------+----------------+
>| cc | char(2) binary | | | | |
>| width | int(1) | YES | | NULL | |
>| height | int(1) | YES | | NULL | |
>| data | blob | YES | | NULL | |
>| id | int(11) | | PRI | NULL | auto_increment |
>| target | int(11) | YES | | NULL | |
>+--------+----------------+------+-----+---------+----------------+
>
>mysql> describe pindex;
>+----------+----------------+------+-----+---------+----------------+
>| Field | Type | Null | Key | Default | Extra |
>+----------+----------------+------+-----+---------+----------------+
>| cc | char(2) binary | YES | | NULL | |
>| count | int(11) | YES | | NULL | |
>| contourc | blob | YES | | NULL | |
>| contourv | blob | YES | | NULL | |
>| densityc | blob | YES | | NULL | |
>| densityv | blob | YES | | NULL | |
>| id | int(11) | | PRI | NULL | auto_increment |
>+----------+----------------+------+-----+---------+----------------
>mysql> update poor, pindex set poor.target=pindex.id where poor.cc=pindex.cc;
>ERROR 1064: You have an error in your SQL syntax near ' pindex set
>poor.target=pindex.id where poor.cc=pindex.cc' at line 1
>
>My query is almost exact as the example in mysql document. What is
>wrong with it?
Your version of MySQL, very likely. What is it?
>
>Thanks.
--
Paul DuBois
http://www.kitebird.com/
sql, query