SELECT CASE WHEN
    (
      SELECT CHARACTER_MAXIMUM_LENGTH
      FROM information_schema.COLUMNS
      WHERE TABLE_SCHEMA=DATABASE()
        AND TABLE_NAME='mdp_sync_log'
        AND COLUMN_NAME='sync_batch_id'
    ) >= 100
THEN 1 ELSE 0 END AS ok;
