SQL Server Performance

What is the difference between having a char vs varchar column as part of a primary key?

Discussion in 'Other SQL Server Blogs around the Web' started by Anonymous, Aug 16, 2007.

  1. Anonymous New Member

    As it sounds this is an interview question, but if you look at the logical level of nothing much changes. There are two major concerns using such way, Performance and Storage space. In this using fixed char fields can be queried faster than varchar fields. But there is a relative difference in fetching the results using with CHAR vs VARCHAR. Only the difference you will find is the occupation of data using char as differed to varchar as Char is stored as a fixed length string, Varchar is stored as...(<a href="http://sqlserver-qa.net/blogs/tools/archive/2007/08/16/what-is-the-difference-between-having-a-char-vs-varchar-column-as-part-of-a-primary-key.aspx">read more</a>)<img src="http://sqlserver-qa.net/aggbug.aspx?PostID=1477" width="1" height="1">

Share This Page