List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 19 2003 5:52am
Subject:Re: This query shouldn't be wrong, but mysql says it is???
View as plain text  
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
Thread
This query shouldn't be wrong, but mysql says it is???Lai19 Mar
  • Re: This query shouldn't be wrong, but mysql says it is???Liu Haifeng19 Mar
  • Re: This query shouldn't be wrong, but mysql says it is???Paul DuBois19 Mar
    • Re: This query shouldn't be wrong, but mysql says it is???Lai Liu-yuan19 Mar