Solved

sql statement mysql

Posted on 2011-02-24
4
330 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:shinuq
shinuq 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now