Eve For Enterprise    Eve Support Community    Forums  Hop To Forum Categories  Resources  Hop To Forums  Community Management    MYSQL ALTER Command?
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
<Poil One One>
Posted
Is it possible to run a MYSQL alter command in telnet or perl like,
ALTER COLUMN make WHERE make=Ford CHANGE COLUMN NEW MAKE IT NO
i am creating a showroom for a car site, and i want to change one column in the New Column, but i dont want to go throught each and every one to change the NEW coulmn to no and only where MAKE = FORD, thanks for the help in advance

--------------
http://extremeforums.org/index
 
Reply With QuoteEdit or Delete MessageReport This Post
<Dan5>
Posted
I'm not too clear on what you want to do so I'm making a guess.
I think you want to use the update command if you are just trying to change some of the data. The alter command I believe is to change the structure of the table.
So you want something like this.
UPDATE tablename SET new='no' WHERE make = 'Ford'

If by new column you mean a column that does not yet exist then you would need to create that first.

To do that you use.

ALTER TABLE tablename ADD newcolumn VARCHAR(20)
you can set it to be what ever type you want obviously.
If i have misunderstood what you are trying to do then please let me know and I will try again.
Regards
Dan
 
Reply With QuoteEdit or Delete MessageReport This Post
<Poil One One>
Posted
ya that is exaclty what i need, thank you.

the first one is the one i am talking about, thank you very much!
UPDATE tablename SET new='no' WHERE make = 'Ford'

--------------
http://extremeforums.org/index
 
Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

Eve For Enterprise    Eve Support Community    Forums  Hop To Forum Categories  Resources  Hop To Forums  Community Management    MYSQL ALTER Command?