>  기사  >  데이터 베이스  >  MySQL에서 열 이름 길이가 5보다 큰 모든 열을 찾는 방법은 무엇입니까?

MySQL에서 열 이름 길이가 5보다 큰 모든 열을 찾는 방법은 무엇입니까?

PHPz
PHPz앞으로
2023-09-22 19:57:09870검색

MySQL에서 열 이름 길이가 5보다 큰 모든 열을 찾는 방법은 무엇입니까?

HAVING을 사용하여 열 이름이 5보다 긴 모든 열을 찾습니다. 그러면 다음과 같은 출력이 생성됩니다 -

+-------------------+-------------------------+
| TABLE_NAME        | COLUMN_NAME             |
+-------------------+-------------------------+
| DemoTable         | UserId                  |
| DemoTable         | EndDate                 |
| DemoTable         | StartDate               |
| DemoTable         | StudentFavouriteSubject |
| DemoTable         | StudentFirstName        |
| DemoTable         | StudentId               |
| DemoTable         | ShippingDate            |
| DemoTable         | Number                  |
| DemoTable         | Value1                  |
| DemoTable         | Value2                  |
| DemoTable         | ArrivalDate             |
| DemoTable         | ShippingDate            |
| DemoTable         | UserAge                 |
| DemoTable         | UserId                  |
| DemoTable         | UserName                |
| DemoTable         | CustomerId              |
| DemoTable         | CustomerValue           |
| DemoTable         | UserId                  |
| DemoTable         | UserMailId              |
| DemoTable         | FirstName               |
| DemoTable         | Number                  |
| DemoTable         | isMarried               |
| DemoTable         | Number                  |
| DemoTable         | FruitName               |
| DemoTable         | FruitPrice              |
| DemoTable         | CustomerAllProductPrice |
| DemoTable         | CustomerId              |
| DemoTable         | CustomerName            |
| DemoTable         | UserId                  |
| DemoTable         | UserScore               |
| DemoTable         | StudentAge              |
| DemoTable         | StudentCountryName      |
| DemoTable         | StudentFirstName        |
| DemoTable         | StudentId               |
| DemoTable         | StudentLastName         |
| DemoTable         | FirstName               |
| DemoTable         | Arrivaldatetime         |
| DemoTable         | Amount                  |
| DemoTable         | Number                  |
| DemoTable         | Number                  |
| DemoTable         | FirstName               |
| DemoTable         | CustomerId              |
| DemoTable         | CustomerPrice           |
| DemoTable         | CustomerProductName     |
| DemoTable         | CustomerProductQuantity |
| DemoTable         | Value1                  |
| DemoTable         | Value2                  |
| DemoTable         | FirstName               |
| DemoTable         | LastName                |
| DemoTable         | UserId                  |
| DemoTable         | MonthNumber             |
| DemoTable         | YearNumber              |
| insertcurrentdate | currentDate             |
| student           | first_name              |
| student           | last_name               |
+-------------------+-------------------------+
55 rows in set (0.01 sec)

위 내용은 MySQL에서 열 이름 길이가 5보다 큰 모든 열을 찾는 방법은 무엇입니까?의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명:
이 기사는 tutorialspoint.com에서 복제됩니다. 침해가 있는 경우 admin@php.cn으로 문의하시기 바랍니다. 삭제