• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

varchar memory allocation

 
Greenhorn
Posts: 17
Firefox Browser Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have one doubt in terms of Database/OS..
We know the VARCHAR is variable length Datatype. I am taking
vName varchar(20)= "Test"
so it will occupy only 4 char's memory and later 16 char's will be discarded as VARCHAR is used. But when I update the same field with "TESTDATA" then How will other 4 chars will be stored/managed ??
If any of you have idea on this issue,then let me know.
 
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
are you asking about memory in the database? or in your VM?

as to be honest I have never cared, it works so haven't spent any thought on it.
How do collections work in java by the VM doing memory allocation and de-allocation for you, it is the same concept.
 
reply
    Bookmark Topic Watch Topic
  • New Topic