+ 2

What is the basic difference char and varchar?

Please give the explanation for this

7th Jul 2016, 4:48 AM
Yash Dani
Yash Dani - avatar
5 Answers
+ 1
The difference is not only about the amount of characters in int, which it max is 255 and varchar is specify by the developer. Varchar is also the modem type of int which handles things like email, regular expressions, and etc, while int bundle limited formats of data.
28th Jul 2016, 8:05 AM
Dorbor H. Richards Jr.
Dorbor H. Richards Jr. - avatar
0
For char data type, the maximum size is fixed whereas for varchar data type, user can set the maximum size of the data type.The name varchar is shortform of variable character.
14th Jul 2016, 4:26 AM
Pallavi
Pallavi - avatar
0
in char the storage space s fixed as given during declaration but in varchar e storage space s dynamic. it only takes amount of space needed to store data.
28th Feb 2017, 1:56 PM
RAJKAMAL J
RAJKAMAL J - avatar
0
@yash Char and varchar main big difference yeh hain If varchar(10) hain toh humnae Ismai 5 value take input Kar Diya toh Baki ki 5 value ki storage Bach jayengi waste nahi hongi And char mai if char(10) hain then hum 5 tak value dali then baki ki bachi storage waste ho jayengi I hope this will help u.
26th Aug 2017, 8:16 AM
Prashant
Prashant - avatar
- 1
char is a fixed length character and have max of 255 byte size whereas varchar have variable character length and max length can be specified in the parentheses
7th Jul 2016, 8:42 AM
Shruti Tembhare