SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 TrimTrailingBlanks, CHAR, and VARCHAR
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

4 Posts

Posted - 07/06/2014 :  05:14:15  Show Profile  Reply with Quote
I am a long-time Oracle user who has recently started using SQL Server. I am trying to understand how the TrimTrailingBlanks setting relates to CHAR and VARCHAR. It seems that TrimTrailingBlanks affects padding that is visible to SQL statements, whereas my understanding of CHAR (at least on Oracle) is that the padding is physical only, not visible when the data is accessed via SQL. I believe the main reason to use CHAR is to pre-allocate space to help prevent fragmentation and/or chaining if updates with bigger values are common in that column. However, I am unclear on why we would ever want pre-allocated space to be visible in SQL. I suspect the Trailing Blanks feature is for an entirely different purpose and would like to understand.

Thanks in advance.

  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000