Subject | RE: [firebird-support] difference char and varchar |
---|---|
Author | Nick |
Post date | 2006-07-07T19:20:37Z |
1) the entire string is updated (but a char would be the same)
2) a varchar takes up more space if it's usually full e.g.
"a string" - char(8)
"A string" - varchar(8) which has to hold the length as well
--
Nick
-----We Solve your Computer Problems---
UNIX, C, Panther, Ingres, Interbase, Firebird - Available Shortly
2) a varchar takes up more space if it's usually full e.g.
"a string" - char(8)
"A string" - varchar(8) which has to hold the length as well
--
Nick
-----We Solve your Computer Problems---
UNIX, C, Panther, Ingres, Interbase, Firebird - Available Shortly
> -----Original Message-----
> From: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com] On Behalf Of martinknappe
> Sent: 07 July 2006 19:52
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] difference char and varchar
>
>
> 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
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> Something is new at Yahoo! Groups. Check out the enhanced
> email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/67folB/TM
> --------------------------------------------------------------
> ------~->
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>