Friday, August 9, 2013

How to find Difference Between char and varchar in SQL

Main difference between char and Varchar in SQL is
                             1. char is fixed length and it add white spaces , but varchar has variable length.
                             Ex:  Data type of column is char[10], if you enter value as 'Balu' , in Data Base it will store as 'Balu      ',i.e it will add 6 white spaces to the value  you entered, but in  case of varchar it is not like this, the value will be same as you entered  i.e 'Balu'.



Thanks for visiting us .
If you find any mistakes or if you want to improve this answer, please leave a comment with your suggestions.


Share This Post →


No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Blog Archive