14,953
edits
| Line 2: | Line 2: | ||
== Maximum length of characters in a column == | == Maximum length of characters in a column == | ||
* Excel<ref>[https://bensullins.com/excel-tip-identifying-the-max-length-of-values-in-a-column/ Excel Tip: Identifying the max length of values in a column - Ben Sullins | Data Geek]</ref>: {{kbd | key=<nowiki>=MAX(LEN(Sheet1!A2:Sheet1!A1048576))</nowiki>}} where 1048576 is the rows limit of Excel spreadsheet<ref>[https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3 Excel specifications and limits - Excel]</ref>. | * Excel<ref>[https://bensullins.com/excel-tip-identifying-the-max-length-of-values-in-a-column/ Excel Tip: Identifying the max length of values in a column - Ben Sullins | Data Geek]</ref>: {{kbd | key=<nowiki>=MAX(LEN(Sheet1!A2:Sheet1!A1048576))</nowiki>}} where 1048576 is the rows limit of Excel spreadsheet<ref>[https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3 Excel specifications and limits - Excel]</ref>. | ||
* MySQL: Using [https://www.w3resource.com/mysql/string-functions/mysql-char_length-function.php | * MySQL: Using [https://www.w3resource.com/mysql/string-functions/mysql-char_length-function.php CHAR_LENGTH() function - w3resource] e.g. {{kbd | key=<nowiki>=SELECT MAX(CHAR_LENGTH(`my_column`)) FROM `my_table`</nowiki>}} {{exclaim}} Not using [https://www.w3resource.com/mysql/string-functions/mysql-length-function.php LENGTH() function]. | ||
More details on [[PHP_and_MySQL_syntax#Length_of_characters | length of characters]] page. | More details on [[PHP_and_MySQL_syntax#Length_of_characters | length of characters]] page. | ||