UPDATE table SET name = REPLACE(name,'blue','');

----- Original Message -----
From: "Tiago Mota" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 25, 2001 9:43 AM
Subject: update a column


> Hi,
>
> I have a book explanning mysql and the commands, and I was here searching
> for some kind of a command that do waht I want. But I didn't find
> anything
>
>
> I have a table named as mytable and two columns (id, name).
> Like this
> id name
> 1  blue dot
> 2  blue pencil
> 3  blue pen
> .
>
> And I want to alter all the cell's that have the word "blue". I want
> to remove the word blue from the cells, without edit them 1 by 1.
> So it will be
> id name
> 1  dot
> 2  pencil
> 3  pen
>
>
>
> Thanks,
> Tiago Mota
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
>


---------------------------------------------------------------------
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