![]() |
MySql query help needed asap.
I have a field in db that is 10 char long and its random characters.
I need to either truncate every one of them to 9 chars or replace last characters with "xx" Is there way to do it with query that will update all rows of data? |
MySQHell.
|
probably just change the field from 10 to 9 characters... but make a backup of the table in case something goes wrong...
|
mysql will prob error if you try to change the field to 9 chrs... back up before trying this, but it should work (and do it to the whole table)
update table set field = substring(field, 1, 9) |
All times are GMT -7. The time now is 11:41 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123