sql - Replace last digit -


how can replace last digit of given field 1?

example : code = 133 , want replace last digit 3 1.

update sometable     set somecolumn = left(somecolumn, len(somecolumn)-1) + '1'; 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -