modify manually the content of a column

This is a discussion on modify manually the content of a column within the MySQL Database forums, part of the Database Forums category; in my table 'users', the column 'email' exists already I created a new colum 'login' and I would like to ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-23-2007
Josselin
 
Posts: n/a
Default modify manually the content of a column

in my table 'users', the column 'email' exists already

I created a new colum 'login' and I would like to COPY the content of
the email column INTO the login column for all existing users....

is it possible to do it in a console or should I write a piece of code
to do it ?

thanks for your advice

joss

Reply With Quote
  #2 (permalink)  
Old 06-23-2007
Jerry Stuckle
 
Posts: n/a
Default Re: modify manually the content of a column

Josselin wrote:
> in my table 'users', the column 'email' exists already
>
> I created a new colum 'login' and I would like to COPY the content of
> the email column INTO the login column for all existing users....
>
> is it possible to do it in a console or should I write a piece of code
> to do it ?
>
> thanks for your advice
>
> joss
>


Maybe

UPDATE users SET login = email;

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote
  #3 (permalink)  
Old 06-23-2007
Josselin
 
Posts: n/a
Default Re: modify manually the content of a column

On 2007-06-23 13:36:38 +0200, Jerry Stuckle <jstucklex@attglobal.net> said:

> Josselin wrote:
>> in my table 'users', the column 'email' exists already
>>
>> I created a new colum 'login' and I would like to COPY the content of
>> the email column INTO the login column for all existing users....
>>
>> is it possible to do it in a console or should I write a piece of code
>> to do it ?
>>
>> thanks for your advice
>>
>> joss
>>

>
> Maybe
>
> UPDATE users SET login = email;


thanks a lot ! that's it ...

joss

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:13 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0