I want to delete last 45 开发者_JAVA技巧char of an attribute in all rows. What can I do ?
UPDATE tablename
SET fieldname = IF(LENGTH(fieldname) > 45,
SUBSTR(fieldname, 1, LENGTH(fieldname) - 45),
fieldname)
try this :
update table
set column = right(column , 44)
精彩评论