Subject | difference char and varchar |
---|---|
Author | martinknappe |
Post date | 2006-07-07T18:52:01Z |
hi
this may sound like a stupid question but what's the difference
between using char and varchar fields? i figure that char fields
always contain the required number of characters with blanks where the
respective string may be too short and that varchar fields depend in
their size on the actual string being currently held but that makes 2
questions come up in my mind:
1)
what happens to a varchar field, once the original string held in it
is updated - does it mean the whole entry and with it the whole db is
changed?
2)
if varchar fields have this advantage of being flexible in size, why
would anyone use char fields? are they faster to access or something?
thanx,
martin
this may sound like a stupid question but what's the difference
between using char and varchar fields? i figure that char fields
always contain the required number of characters with blanks where the
respective string may be too short and that varchar fields depend in
their size on the actual string being currently held but that makes 2
questions come up in my mind:
1)
what happens to a varchar field, once the original string held in it
is updated - does it mean the whole entry and with it the whole db is
changed?
2)
if varchar fields have this advantage of being flexible in size, why
would anyone use char fields? are they faster to access or something?
thanx,
martin