Simple yet useful SQL statement

Mostly for MySQL

To duplicate a table:

CREATE TABLE new_table LIKE old_table;

To replace some character in a field value:

update TABLENAME set FIELDNAME = replace (FIELDNAME, searchstr, replacestr)

 

Leave a Reply

Your email address will not be published. Required fields are marked *