MySQL中如何找到列名长度大于5的所有列?

2023年 9月 22日 86.5k 0

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的所有列?的详细内容,更多请关注每日运维网(www.mryunwei.com)其它相关文章!

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论