Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving space with Varchar
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01345228
Message ID:
01345232
Views:
17
Thx Sergey

If a normal character field in a table has many spaces in it, will it take up as much disk space as a character with text in it? Is there any way around this ?

The character fields are only part full, is they any way to save space?


>No, you'll not save space. The varchar data type in VFP is stored the same way as char data type. The only difference is that varchar is padded with CHR(0) and char is padded with spaces.
>The varchar was introduced mainly for compatibility with MS SQL server.
>
>>I thought the varchar field type would save space in the file size of my table?
>>
>>I have a table that has thousands of records and many character fields, I thought by changing the character fields to varchar the table size would be reduced?
>>
>>Have I got this all wrong?
Rob
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform