Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

sql statement mysql

Posted on 2011-02-24
4
333 Views
Last Modified: 2012-05-11
please suggest sql state ment to update

such as
645 change to dd645
478 change to dd478

inmy sql statement
         
0
Comment
Question by:teera
4 Comments
 
LVL 24

Accepted Solution

by:
jimyX earned 125 total points
ID: 34977052
update YourTable set YourCloumn=concat("dd",YourCloumn);
0
 
LVL 11

Assisted Solution

by:Ovid Burke
Ovid Burke earned 125 total points
ID: 34977065
Try:
UPDATE tablename SET fieldname = CONCAT('dd',fieldname);

Open in new window

0
 
LVL 17

Assisted Solution

by:Shinesh Premrajan
Shinesh Premrajan earned 125 total points
ID: 34977096
Above one are correct, This will hit only the records that are defined in the where condition.

UPDATE tablename SET fieldname = CONCAT('dd',fieldname) where fieldname in ('645','478');

0
 
LVL 7

Assisted Solution

by:waltersnowslinarnold
waltersnowslinarnold earned 125 total points
ID: 34977140
You can use the below format as well,
UPDATE tableName
SET
fieldName = 'dd'+fieldName

Open in new window

0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Correct an issue with a where clause with calculation 2 39
java mysql insert application 14 26
Trouble with <> 2 20
SQL Syntax Grouping Sum question 7 24
Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Foreword This article was written many years ago, in the days when PHP supported the MySQL extension (http://php.net/manual/en/function.mysql-connect.php).  Today (http://php.net/manual/en/migration70.removed-exts-sapis.php) you would not use MySQL…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question