You will need to create SELECT statement in conjunction with LIKE.
Please list people which have first_name with at least 6 character long
names table schema
- id
- first_name
- last_name
results table schema
- first_name
- last_name
Solution:
SELECT
first_name,
last_name
FROM
names
WHERE
first_name LIKE '______%'
- Percent Sign (%): represents zero or more unspecified characters
- Under Score(_) : Represents 1 unspecified character
Result:
| first_name | last_name |
| Aundrea | Crona |
| Jonathan | Corkery |
| Rodney | Bernhard |
| Fidelia | Reilly |
| Savanna | Kuvalis |
| Sandie | Bernhard |
'나는 이렇게 학습한다 > Algorithm & SQL' 카테고리의 다른 글
| SQL with LOTR: Elven Wildcards (0) | 2022.06.10 |
|---|---|
| SQL Basics: Raise to the Power (0) | 2022.06.09 |
| SQL Basics: Repeat and Reverse (0) | 2022.06.07 |
| SQL Basics - Position (0) | 2022.06.06 |
| Register for the Party (SQL for Beginners #3) (0) | 2022.06.05 |