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

Time:11-08

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.

CodePudding user response:

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.

  • Related