IT Community - Software Programming, Web Development and Technical Support

What is the difference between CHAR and VARCHAR data types?

This is a discussion on What is the difference between CHAR and VARCHAR data types? within the Database Support forums, part of the Web Development category; Hi, Any one Explain. --Sundar...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 02-01-2008, 10:34 PM
sundarraja sundarraja is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 174
sundarraja is on a distinguished road
Question What is the difference between CHAR and VARCHAR data types?

Hi,

Any one Explain.

--Sundar
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-01-2008, 10:36 PM
sundarraja sundarraja is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 174
sundarraja is on a distinguished road
Thumbs up Re: What is the difference between CHAR and VARCHAR data types?

CHAR
CHAR is a fixed length data type. CHAR(n) will take n characters of storage even if you enter less than n characters to that column. For example, "Hello!" will be stored as "Hello! " in CHAR(10) column.
VARCHAR
VARCHAR is a variable length data type. VARCHAR(n) will take only the required storage for the actual number of characters entered to that column. For example, "Hello!" will be stored as "Hello!" in VARCHAR(10) column.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server Data Types and Ranges. Sundaram Database Support 7 11-14-2008 05:11 AM
What is the difference between global and action sheets within the data table in QTP? sundarraja Testing Tools 1 08-13-2007 11:50 PM
How can I implement opaque (abstract) data types in C? prasath C and C++ Programming 1 07-30-2007 04:24 AM
Convert integer type variable to char array oyu2o C and C++ Programming 0 03-10-2007 09:47 AM
Java:Tutorial - Data Types pranky Java Programming 0 02-24-2007 12:47 AM


All times are GMT -7. The time now is 06:07 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0