List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 19 2001 10:52pm
Subject:Re: Mzximum character count
View as plain text  
At 8:43 AM +1000 9/20/01, Neil Silvester wrote:
>Hello,
>I am working on a MySQL database that lists the current competitors 
>of the company I work for as a part of a global intranet. At present 
>I have a table that contains the corporate website of our 
>competitors. I would like to find out what record in the table has 
>the largest amount of characters. This way I could possibly decrease 
>the varchar size (currently 100) to speed up the queries.
>
>My table is as below.
>CREATE TABLE competitor (
>	CompetitorsName varchar(35) not null,
>	Website varchar(100),
>	ID int auto_increment not null primary key
>)
>
>TIA.

SELECT MAX(LENGTH(Website)) FROM competitor

You might also look up PROCEDURE ANALYSE() in the manual.

>
>Neil Silvester
>Systems Administrator / Webmaster.
>Heat and Control Inc.


-- 
Paul DuBois, paul@stripped
Thread
Mzximum character countNeil Silvester20 Sep
  • Re: Mzximum character countPaul DuBois20 Sep
  • RE: Mzximum character countChris Bolt20 Sep