with '@' added to the second param :
update emails set t=concat(substring_index(t,'@',1),'@mydomain.com');

:o)

Selon [EMAIL PROTECTED]:

> Hi ,
> you can. see this :
> mysql> select * from emails;
> +-------------------+
> | t                 |
> +-------------------+
> | [EMAIL PROTECTED] |
> | [EMAIL PROTECTED] |
> | [EMAIL PROTECTED] |
> +-------------------+
> 3 rows in set (0.00 sec)
>
> mysql> update emails set t=concat(substring_index(t,'@',1),'mydomain.com');
> Query OK, 3 rows affected (0.05 sec)
> Rows matched: 3  Changed: 3  Warnings: 0
>
> mysql> select * from emails;
> +-------------------+
> | t                 |
> +-------------------+
> | name1mydomain.com |
> | name1mydomain.com |
> | name1mydomain.com |
> +-------------------+
> 3 rows in set (0.00 sec)
>
> Mathias
>
> Selon shaun thornburgh <[EMAIL PROTECTED]>:
>
> > Hi,
> >
> > Is it possible to update all the domain names for an email column? I want
> to
> > change everyones email address to my domain for a test site, so can I
> change
> > the email address column such that everything after @ is changed to
> > mydomain.com?
> >
> > Thanks for your advice
> >
> >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> >
> >
>
>
>



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to