List:General Discussion« Previous MessageNext Message »
From:ragan_davis Date:April 22 2005 10:08pm
Subject:problem with update statement
View as plain text  
Hello, all:

In a MyISAM table, I have a column named "MAC", of type VARCHAR(17).  
This field is used to hold MAC addresses of computers' network 
interface cards.  These MAC addresses are in the 
form "XX:XX:XX:XX:XX:XX", where X can be either a number or an 
uppercase letter.  I can run "select * from table where 
MAC='00:04:FB:23:5A:44'" and the correct record is returned.  However, 
performing "update table set port_index='123' where 
MAC='00:04:FB:23:5A:44'" does not work as I expected.  It does update 
the correct record, but also updates all other records whose MAC field 
is empty.  When I originally created this field, I used type VARCHAR
(17), null, default value NULL.  In troubleshooting this, I have since 
change the type to CHAR(17), not null, empty default value.  Still 
have the same problem.  Does anyone know what's going on here, and how 
I could correct this?

Thanks!
Thread
problem with update statementragan_davis23 Apr
  • Re: problem with update statementBrent Baisley25 Apr
    • Re: problem with update statementmfatene25 Apr
Re: problem with update statementragan_davis25 Apr