MySQL view error

From Noah.org
Revision as of 19:38, 2 July 2007 by Root (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


When using MySQL 5.x with views you might see the following errors. There is no cure that I know of. It's hard to repeat. I am able to drop the view, so I can get around the problem that way.

mysql> show index from `my_table_view`;
ERROR 1241 (21000): Operand should contain 3 column(s)
mysql> desc `my_table_view`;
ERROR 1241 (21000): Operand should contain 3 column(s)
mysql> show create table `my_table_view`;
ERROR 1241 (21000): Operand should contain 3 column(s)

Or when using phpMyAdmin you might see this:

SQL query: Edit

SHOW INDEX FROM `my_table_view` ;

MySQL said: Documentation
#1241 - Operand should contain 3 column(s) 

or this:

SQL query: Edit

SHOW KEYS FROM `my_table_view` ;

MySQL said: Documentation
#1241 - Operand should contain 3 column(s)