* Jones Tyler
> My problem is that I am unable to change data in an
> existing table. I use the UPDATE function and it
> continues to tell me that I am using an Unknown
> Column.

That's right, you are... :)

> When I do a DESCRIBE on the table, I clearly see the
> column.
>
> Since I can see the column in the describe (named
> 'Field'), I must be doing something else wrong.

This is where you are wrong. When you do a DESCRIBE on a table, you get a
table as a result, and this result table has a column named 'Field'. This
column is not part of the described table... (try DESCRIBE on any other
table, you will allways see the same 'Field' column.)

The columns of the DESCRIBE'ed table are those _listed_ in the 'Field'
column, and the type of the columns are listed in the 'Type' column. See?

> Any help would be appreciated. (Thanks to Oscar, but
> his link seems to be for actually changing the format
> of a table, which is not my goal...yet=)

Actually, in this case you have to change the table definition, and ALTER
TABLE is the correct statement.

> > The fix is to change the entry in a row of a table
> > for
> > a particular horizontal entry (or field, if you
> > will).

"...the entry in a row..."

Which row would that be?

> > After I select the dB, I then typed SHOW TABLES and
> > identified the table in question (HUNT_CONFIG).
> > Looking at the Table, I then find the The first
> > column
> > is FIELD and the table entry I am interested in has
> > a
> > FIELD value of regtype.

Ok... you did DESCRIBE HUNT_CONFIG, right?

The name of the field is 'regtype'.

> > I want to change the entry in the third column for
> > regtype, which is titled VAR. The current value is

VAR...?

> > enum('0','1','2') and I need this value to be
> > enum('0','1','2','3')

Right. ENUM is a data type, to change the data type is not the same as
changing the content of the column. UPDATE is for changing the content of
the column.

> > So, I typed the following:
> >
> > UPDATE HUNT_CONFIG SET VAR='enum('0','1','2','3')
> > WHERE FIELD='regtype';

Yes, this is wrong. Try something like:

ALTER TABLE HUNT_CONFIG MODIFY regtype enum('0','1','2','3');

--
Roger
sql


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to