Try:

Update myTable set myField = concat(myField,' new data to add') where
myField = 'some restrictions';


Regards!



> -----Mensaje original-----
> De: Rich [mailto:[EMAIL PROTECTED] 
> Enviado el: MiƩrcoles, 01 de Noviembre de 2006 06:35 p.m.
> Para: Submit MySQL
> Asunto: Update field concactenation
> 
> 
> Hi folks.  Boy do I have an interesting one for you today.  
> This list  
> is great.
> 
> Can I update a record using a typical update query, and have a field  
> be updated to:
> 
> previous value of the field + (something I want added to the end)
> 
> so field 'flavours' starts out as: "vanilla chocolate"
> 
> ...then I want to add "strawberry" to it in a single 
> update...to get...
> 
> "vanilla choclolate strawberry"
> 
> Or do I have to grab the value first in a subquery or alternate  
> query?  I just have multiple records to work on so I'd like to do it  
> in one db call.
> 
> Cheers
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
> http://lists.mysql.com/mysql?> [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