Computer >> 컴퓨터 >  >> 프로그램 작성 >> MySQL

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)