MYSQL 全表替换
SELECT CONCAT('UPDATE ', TABLE_SCHEMA, '.', TABLE_NAME, ' SET ', '`',COLUMN_NAME, '`', '=REPLACE(','`',COLUMN_NAME,'`', ',''www.www.ctouy.com'',''www.ctouy.com'');') AS ReplaceQuery
FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='ctouy' AND DATA_TYPE IN ('char','varchar','text','mediumtext','longtext');
评论0条