LeetCode 1527: Patients With a Condition [SQL]

Поделиться
HTML-код
  • Опубликовано: 29 янв 2025

Комментарии • 2

  • @JingyuZhao-d3k
    @JingyuZhao-d3k 27 дней назад

    Why LIKE '%(space)DIAB1%' works for ACNE(space)+DIAB100 in the test case? I though DIAB1% is a string starts with DIAB1.

    • @frederikmuller
      @frederikmuller  27 дней назад

      There’s another % at the start of the search string meaning anything could come before the search term. In this case, what we’re checking is ' DIAB1‘ being anywhere in the string. The space makes sure we’re looking at a new word starting.