SQL Server – Char vs. Varchar
Beginner developers often get confused about which types should they use when they create tables or what difference it makes.
Well, there is a good reason for the existence of all types – or at least there was when they were invented. I will soon publish a new series of posts about SQL data types, however, in this post I will talk about the most commonly misunderstood types and what troubles they likely to cause.
I found string types to be the most troublesome, especially Char. First and foremost Char is a fixed length type, which means that the space for the length of the characters is reserved. Opposed to this VarChar (acronym for variable character) is a variable length type which could save a considerable amount of space in large databases in exchange for some speed*. Continue reading
| Abstract Data Types: Their Specification, Representation and Use (Applied Mathematics & Computing Science) … |
![]() | The Data Model Resource Book: A Library of Universal Data Models by Industry Types: v. 2 This text shows readers how to create data models that meet the unique needs of most businesses. The authors identify which generic models contained in Volume 1 of this title can be used directly ‘as is’ and which need to… |
