Solved

sql statement mysql

Posted on 2011-02-24
4
336 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
[X]
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
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

617 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