SELECT CONCAT(' select ',GROUP_CONCAT(COLUMN_NAME),' from ', TABLE_NAME,' ;') FROM information_schema.COLUMNS WHERE table_name = 'maintenance_plan' and COLUMN_NAME != 'plan_name'