How to know the maxmimum length of data in a perticular column?

2003-07-28 Thread Karam Chand
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,[EMAIL PROTECTED],2000-12-12
20,[EMAIL PROTECTED],NULL
...

It will return me 

2,15,10

I hope I make myself clear.

Thanks in advance.

Karam


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to know the maxmimum length of data in a perticular column?

2003-07-28 Thread Dan Nelson
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,[EMAIL PROTECTED],2000-12-12
 20,[EMAIL PROTECTED],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
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to know the maxmimum length of data in a perticular column?

2003-07-28 Thread Karam Chand
Great.

That does it. Thanks. Thanks. Thanks.

Karam

--- Dan Nelson [EMAIL PROTECTED] wrote:
 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,[EMAIL PROTECTED],2000-12-12
  20,[EMAIL PROTECTED],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
   [EMAIL PROTECTED]


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]