update <table name> set id = replace(id, '1', '2'); hope this helps
anil ----- Original Message ----- From: "Patrick J Okui" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 16, 2002 9:47 AM Subject: UPDATE command.. > > > I have two collumns in my mysql database like this > > +------------------+------------+ > |id |domain | > +------------------+------------+ > |user@domain1com |domain1.com | > |[EMAIL PROTECTED] |domain1.com | > |[EMAIL PROTECTED] |domain1.com | > +------------------+------------+ > > in a table users. > > How do I construct an sql update statement like > update users set id =..... where domain = "domain1.com" > > so that the id column becomes > +------------------+ > |id | > +------------------+ > |[EMAIL PROTECTED] | > |[EMAIL PROTECTED] | > |[EMAIL PROTECTED] | > +------------------+ > > thanks. > > Patrick J Okui > > > > --------------------------------------------------------------------- > 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