set @switch_schema= concat(\'use \', v6_schema, \';\'); select @switch_schema; PREPARE s3 from @switch_schema; EXECUTE s3;
Prepare statement does