This appendix explains the different datatypes used in MySQL. As explained in Chapter 1, "Understanding SQL," datatypes are basically rules that define what data may be stored in a column and how that data is actually stored. Datatypes are used for several reasons:
When designing tables, pay careful attention to the datatypes being used. Using the wrong datatype can seriously impact your application. Changing the datatypes of existing populated columns is not a trivial task. (In addition, doing so can result in data loss.) Although this appendix is by no means a complete tutorial on datatypes and how they are to be used, it explains the major MySQL datatype types, and what they are used for. |