100 % || INTUITIVE && WELL - EXPLAINED || EASY SQL QUERY || Using LIKE Opr. || Beats 92.33 % || Ex.
Intuition\n Describe your first thoughts on how to solve this problem. \nSELECT * --> show all records from Patients table...\nFROM Patients --> Association fro
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nSELECT * --> **show** all records from **Patients** table...\nFROM Patients --> **Association** from **Patients** table...\nWHERE conditions LIKE (\'DIAB1%\') --> Prefix should be **\'DIAB1\'**...\nOR conditions LIKE (\'% DIAB1%\'); --> also for second word, Prefix should be **\'DIAB1\'**...\n# Approach\n<!-- Describe your approach to solving the problem. -->\nUsing Fundamentals of **SQL**...\n# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nSELECT * \nFROM Patients \nWHERE conditions LIKE (\'DIAB1%\') \nOR conditions LIKE (\'% DIAB1%\');\n```
['Database', 'MySQL']