List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:July 28 2003 8:08pm
Subject:Re: How to know the maxmimum length of data in a perticular column?
View as plain text  
In the last episode (Jul 28), Karam Chand said:
> Greetings
> 
> Is there any query to know the maximum string length
> of data in every column of the table?
> 
> For eg, if I have data -
> 
> 1,mysql@stripped,2000-12-12
> 20,me@stripped,NULL
> ...
> 
> It will return me 
> 
> 2,15,10

SELECT MAX(LENGTH(field1)) AS f1len, MAX(LENGTH(field2)) AS f2len,
 MAX(LENGTH(field3)) AS f3len FROM mytable;

-- 
	Dan Nelson
	dnelson@stripped
Thread
How to know the maxmimum length of data in a perticular column?Karam Chand28 Jul
  • Re: How to know the maxmimum length of data in a perticular column?Dan Nelson28 Jul
    • fulltext indexing and query speeds?Niels Larsen28 Jul
      • Re: fulltext indexing and query speeds?Sergei Golubchik28 Jul
    • Re: How to know the maxmimum length of data in a perticular column?Karam Chand29 Jul
      • Category System schemaAlex Pilson29 Jul
        • RE: Category System schemaPeter Lovatt29 Jul
Re: fulltext indexing and query speeds?Sergei Golubchik29 Jul
  • Re: fulltext indexing and query speeds?Niels Larsen29 Jul
    • Re: fulltext indexing and query speeds?Sergei Golubchik30 Jul