Use the concat function. It takes any number of arguments. mysql> create table test (a char(5)); Query OK, 0 rows affected (0.04 sec)
mysql> insert into test values ('A'); Query OK, 1 row affected (0.02 sec) mysql> select * from test; +------+ | a | +------+ | A | +------+ 1 row in set (0.02 sec) mysql> update test set a = concat(a,"A"); Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select * from test; +------+ | a | +------+ | AA | +------+ 1 row in set (0.00 sec) > -----Original Message----- > From: Michael Brunson [mailto:brunson@;intercosmos.com] > Sent: Wednesday, October 16, 2002 11:30 PM > To: [EMAIL PROTECTED] > Subject: Re: update and data manipulation > > > On Thu, 17 Oct 2002 03:50:47 +0100, Nikolas Galanis > used a few recycled electrons to form: > > | Hello > | > | When I want to update a value, I can use numerical > functions like +,* > | etc. Can I do the same with strings? For example, when I > want to append > | a string in an existing value, how (if of course) can I do > it inside the > | update query? Thanks. > > Yes > > | Nikolas > | > | p.s: I know I can do it with PHP, I was just wondering if it is > | possible > | with SQL. > > Yes > > > > --------------------------------------------------------------------- > 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