younghyun
younghyun

Reputation: 341

max(length(col)) How do I apply it to all columns? in MYSQL

I can check one column using max(length(col)). How do I apply it to all columns without typing?

The purpose is to modify the maximum length allowed for table char.

Upvotes: 1

Views: 27

Answers (1)

Bill Karwin
Bill Karwin

Reputation: 562280

You can get the maximum length of all columns by using PROCEDURE ANALYSE in MySQL 5.7.

Unfortunately, this feature has been removed in MySQL 8.0. So if you use the current version of MySQL you will have to do the typing.

Upvotes: 1

Related Questions