Saturday 16 April 2016

MySQL queries

To select records containing a particular string chain:

SELECT * FROM tablename WHERE instr(fieldname, "find this string");

To update text strings in records:

update films set fieldname = replace(fieldname, 'find this string', 'replace found string with this string');

No comments:

Post a Comment