/ Published in: MySQL
Example: There is a table, 'user', with a column, 'clear', containing values such as:
`clear\'animal\' \'pass'\ `
and we would like to retrieve 'animal' and 'pass' ( without the pre & post \' )
Expand |
Embed | Plain Text
SELECT TRIM( BOTH '\\\'' FROM clear ) FROM user WHERE SUBSTRING( clear, 1, 1 ) = '\\' UPDATE user SET clear = TRIM( BOTH '\\\'' FROM clear ) WHERE SUBSTRING( clear, 1, 1 ) = '\\'
You need to login to post a comment.
