SELECT CONCAT( 'ALTER TABLE `', table_name, '` DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci;' ) FROM information_schema. TABLES WHERE table_schema = 'vec_new'