PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Size of null char field
Date: Apr 28 1998 4:10PM

Mick Ghazey writes:
 > How big is a char field that allows nulls? The reason I ask is because
 > sybperl returns trailing spaces to fill out the column to the declared
 > width for not null fields. Yet it returns only the actual string for
 > null fields. Does that imply that sybase uses less disk space for null
 > fields?

As I believe others have reported, Sybase stores nullable char fields
as varchars, which is the reason why they don't get padded with ' ' to 
the actual maximum width. I'm not 100% sure if varchar fields use less 
space than char fields, but I think so (at least if they are not
completely filled...)

Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@datamig.com    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com