logo       

RE: Create Table Bug w/Varchar and Char: msg#01117

db.mysql.general

Subject: RE: Create Table Bug w/Varchar and Char

On 28 Jun 2002, at 15:10, Don Vu wrote:

> interesting "feature"....thanks...

In the cases you present it certainly seems to be a feature, since
specifying the column types as VARCHAR wastes space for no advantage.
A VARCHAR(1) takes 2 bytes of storage, while a CHAR(1) takes only 1
byte. Similarly, a VARCHAR(2) takes 2 or 3 bytes, depending on
whether it contains 1 or 2 characters, while a CHAR(2) always takes
2. Why is it important that the columns be VARCHAR? What problems
does the change cause?

[Filter fodder: SQL]

--
Keith C. Ivey <keith@xxxxxxxxxxx>
Tobacco Documents Online
http://tobaccodocuments.org

---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <mysql-thread113366@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail
<mysql-unsubscribe-gcdmg-mysql=m.gmane.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise