Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Empty Fields or Null...

Status
Not open for further replies.

handle87

Programmer
Jun 27, 2005
53
CA
Hi,

In a MySQL table if you have a field that is empty, does it still hold that space?

And also, if you put a Null value in it does that change anything?

CES
 
Sorry dude.. thought it was pretty clear...

You have a table..
two fields:
- FirstName
- LastName

One of the records has a FirstName and NO LastName and another record has Both FirstName and LastName do both records hold the same amount of space?

with number & datetime fields I found they do... what about a field that is type Text? In regards to MySQL.

So is the space of the field reserved..

is that clear?



CES
 
No there isnt... however I figured that someone probably knows the answer in this forum as PHP and MySQL are married... sorry to bother you. I found out the answer.

take care!
 
it depends how you declared the fields, if it's with char(30) for instance I believe that 30 characters are reserved even if you don't use them if you use varchar then non filled space is not added to you quota ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top