|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
How to I update a row base on the lowest value of a particular column?
Example: |A|B| |2| | |1|X| <-- update X |3| | What is the command to use? I can do "select min(A) from table;" but not "update table set B=1 where min(A);". Anyone expert in SQL language, please help! |
|
#2
|
|||
|
|||
|
I'm not sure if this will work, I don't have access to mysql at the moment but give it a shot.
update table set B=1 where A=min(A); |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Help on UPDATING! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|