Connecting Tech Pros Worldwide Forums | Help | Site Map

updating mysql table

pradeepjain's Avatar
Needs Regular Fix
 
Join Date: Jul 2007
Location: India
Posts: 407
#1: Apr 27 '09
hii ppl,
I have a small prob.i need to feed some things to DB table manually . say a date which will be common to around 10 id's . So i there a way to update all these ID's together like
update set date='aug' where id=1,2,3 or something like that .

?


Thanks,
Pradeep

mwasif's Avatar
Moderator
 
Join Date: Jul 2006
Location: Pakistan
Posts: 719
#2: Apr 28 '09

re: updating mysql table


Expand|Select|Wrap|Line Numbers
  1. update `table` set `date`='aug' where id IN (1,2,3)
pradeepjain's Avatar
Needs Regular Fix
 
Join Date: Jul 2007
Location: India
Posts: 407
#3: May 5 '09

re: updating mysql table


thanks it worked !!!!!
Reply