Bob, SQLite will always use TEXT and allocate just as much space as necessary to store the information at hand. I think it is a better option.
So if you just store 10 chars in that column, the TEXT field will use just that space and nothing more. On Mon, Jul 16, 2012 at 2:58 PM, Bob Sneidar <[email protected]> wrote: > Wha?? I thought the whole point to using VARCHAR was that it only used as > much space as the actual text needed. What is the difference between TEXT > and VARCHAR then? > > Bob > > > On Jul 16, 2012, at 9:50 AM, Peter Haworth wrote: > > > SQLite does have some advantages over other dbs in this area. Since it > > effectively ignores any length specification, e.g. VARCHAR(100), it only > > stores the number of characters you give it during an INSERT or UPDATE > > operation. On the other hand VARCHAR(100) on most other SQL dbs will > > allocate enough disk space to store 100 characters even if you only put 1 > > character in the column. The "100" is a constraint that prevents more > than > > 100 chars from being put into the column but doesn't affect the storage > > space. > > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- http://www.andregarzia.com -- All We Do Is Code. http://fon.nu -- minimalist url shortening service. _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
