0
what is difference between varchar and char?(in terms of memory allocation also)
3 Réponses
+ 2
character can allocates static memory and range is 1-2000 characters datatype is char (size).
varchar can allocates dynamic memory and range is 1-4000 characters datatype is varchar2(size).
+ 1
In char, we will give particular no of characters correctly but, in varchar, we will variable no of characters into it
for example, if u Give the attribute type as char(20),you will Give 20 characters fully
but if you give varchar(20), you give maximum 20 characters into the attribute
- 2
char accept only letters. varchar accept letters and numbers