|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
||||
|
||||
|
OK, I said most of it in the title. When in mySQL you define a VARCHAR you put a number in brackets after it. What is the meaning of that number? Is it the maximum number of characters that string can be?
|
|
#2
|
|||
|
|||
|
Yep.
|
|
#3
|
||||
|
||||
|
Thanks rod k, just out of interest, how do you become a member rather than a junior member on this bb?
So in theory, I could just do VARCHAR(255) and I can have it up to 255 characters? Are there any disadvantages to this? |
|
#4
|
|||
|
|||
|
Just post a lot ;-)
Yes you understand correctly. Generally you should use CHAR() wherever possible. However, if any fields would benefit from varchar() and you make them such, then all char() fields will become varchar() fields. Varchar() fields are advantageous when the data element size range is large. |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > What does that number mean when you define a VARCHAR(X) ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|