Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

char or varchar?
What is the difference between CHAR en VARCHAR?

Report this thread to moderator Post Follow-up to this message
Old Post
Roderik
04-22-05 01:56 AM


Re: char or varchar?
Roderik wrote:

> What is the difference between CHAR en VARCHAR?

http://dev.mysql.com/doc/mysql/en/char.html

--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com

Report this thread to moderator Post Follow-up to this message
Old Post
Chris Hope
04-22-05 01:56 AM


Re: char or varchar?
On Thu, 21 Apr 2005 22:15:34 +0200, Roderik <mail@roderik.net> wrote:

>What is the difference between CHAR en VARCHAR?

VAR.

For more details see the manual of the database you're using.

Usually it's to do with blank padding.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool

Report this thread to moderator Post Follow-up to this message
Old Post
Andy Hassall
04-22-05 01:56 AM


Re: char or varchar?
"Roderik1" wrote:
> What is the difference between CHAR en VARCHAR?

Obviously varchar is more flexible, as your field can be any number of
chars up to the max length.

The flip side is that there is a performance penalty for having
varchars.  The penalty comes into play even if you have a single
varchar (or text) field.

It is not a big deal unless your table is huge.

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/PHP-SQL-cha...pict216440.html
Visit Topic URL to contact author (reg. req'd).  Report abuse: http://www.dbforumz
.com/eform.php?p=759021

Report this thread to moderator Post Follow-up to this message
Old Post
steve
05-03-05 08:58 AM


Re: char or varchar?
"steve" <UseLinkToEmail@dbForumz.com> wrote in message
 news:4_759021_2ac27d4dab8423897be7979e65
a4a582@dbforumz.com...
> "Roderik1" wrote: 
>
> Obviously varchar is more flexible, as your field can be any number of
> chars up to the max length.
>
> The flip side is that there is a performance penalty for having
> varchars.  The penalty comes into play even if you have a single
> varchar (or text) field.
>
> It is not a big deal unless your table is huge.
>
>

A second caveat is that in any table that contains both CHAR and BLOB
columns, the CHAR will be converted to VARCHAR automatically.

Norm
--
FREE Avatar hosting at www.easyavatar.com



Report this thread to moderator Post Follow-up to this message
Old Post
Norman Peelman
05-07-05 01:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP SQL archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:22 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.