|
|
| Roderik 2005-04-21, 8:56 pm |
| What is the difference between CHAR en VARCHAR?
| |
|
|
| Andy Hassall 2005-04-21, 8:56 pm |
| 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
| |
|
| "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
| |
| Norman Peelman 2005-05-07, 8:56 am |
| "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
|
|
|
|