Shamelessly stolen from here.
After creating a MySQL database, you need to create a table. There are
many data types and choosing the wrong one can create huge problems
later on. This is a simple list of the different data types and what
they are generally used for.
TINYINT: A very small integer (-128 to 127)
SMALLINT: A small integer (-32768 to 32767)
MEDIUMINT: A medium-sized integer (-8388608 to 8388607)
INT: A normal-sized integer (-2147483648 to 2147483647)
BIGINT: A very large integer
FLOAT: A floating-point number
DOUBLE: A double-precision floating-point number
DECIMAL: A packed exact fixed-point number
VARCHAR: Varying Characters (up to 255 characters, no line break)
TEXT: A column (up to 65,535 characters, with line break)
BLOB: A case-sensitive column (up to 65,535 characters, with line break)
DATE: A date
TIME: A time
DATETIME: Date and Time combination
TIMESTAMP: useful for recording the date and time of an INSERT or UPDATE
operation
Auto Increment: Auto-Increment fields are useful for assigning unique
identification numbers for users, products, and customers, etc. By
default, fields are incremented using number characters (like "1", "2").
Primary Key: The primary key is a data column that uniquely identifies a
specific instance of that data. At least one of your fields must be a
Primary Key. Username is an example of a good primary key. You do not
want to have more than one individual having the same username.
Index Key: Allows you to speed up searches by designating a field as a
preferred data source, especially when combining data from multiple
tables.
Database Tips
Support, Snippets & Projects
Moderators: Moderator, Global Moderator
Jump to
- General Category
- ↳ KillaNet Country
- ↳ 2D Graphics
- ↳ KillaNet News
- ↳ 3D & Animation
- ↳ Chatroom
- ↳ Flash
- ↳ Help & Suggestions
- ↳ Game Dev
- ↳ Audio & Video
- ↳ Introductions
- ↳ Journalism
- ↳ Phoenix Lounge
- ↳ Application Dev
- ↳ Toga Toga Toga!!!
- ↳ Photography
- ↳ Main Street Archives
- ↳ Web Design
- ↳ Fonts Icons Cursors & Screensavers
- ↳ Book Reviews
- ↳ General
- ↳ Tech Industry News
- ↳ Legal Resources
- ↳ Industry Contests
- ↳ Graphix Battle Arena
- ↳ KillaNet Contests
- ↳ Competition Archives
- ↳ Education Information
- ↳ Careers
- ↳ Game Studies
- ↳ Motivation
- ↳ Conferences & Seminars
- ↳ KillaDesign
- ↳ Animation & Film
- ↳ The Studio
- ↳ Game Development
- ↳ 2D Graphics
- ↳ Audio & Video
- ↳ 3D Graphics
- ↳ Flash
- ↳ Fonts, Icons & Emoticons
- ↳ Design Requests
- ↳ PhotoShop
- ↳ Cinema 4D
- ↳ Bryce
- ↳ Flash
- ↳ Paint Shop Pro
- ↳ Blender
- ↳ Poser
- ↳ The Darkroom
- ↳ Photo & Camera Discussion
- ↳ Photo Journalism
- ↳ Web Design Principles
- ↳ PHP & MySQL
- ↳ Designing For Print
- ↳ Writer\'s Desk
- ↳ Fiction Writing
- ↳ News Journalism
- ↳ Poetry
- ↳ Technical Writing
- ↳ Biographical Writing
- ↳ General Writing Resources
- ↳ Promotional Writing
- ↳ Film & Television
- ↳ VideoGames
- ↳ Computer Department
- ↳ General Discussion
- ↳ Windows Help
- ↳ Linux Help
- ↳ Builds & Mods
- ↳ Geek Gadgets
- ↳ Security
- ↳ Dev Discussion
- ↳ C++
- ↳ Visual Basic
- ↳ Java
- ↳ Application Skinning
- ↳ IRC Scripting
- ↳ Gaming Centre
- ↳ Guild Wars
- ↳ Aion
- ↳ Computer
- ↳ World of Warcraft
- ↳ Nintendo
- ↳ General RPG & MMORPG
- ↳ PlayStation
- ↳ XBox
- ↳ Other Consoles
- ↳ All Action
- ↳ Racers
- ↳ Sports
- ↳ FPS
- ↳ RTS
- ↳ Sim
- ↳ Casual Games
- ↳ Kids' Games
- ↳ Mobile Games
- ↳ Retro Games
- ↳ Challenges, Friendly Taunts & Discussion
- ↳ Game Requests & Bug Reports
- ↳ Open Source Games
- ↳ Puzzle Games
- ↳ HeadQuarters
- ↳ Uber Coffee Room
- ↳ KillaNet
- ↳ Coffee Room
- ↳ KillaNet
- ↳ KillaGraphix
- ↳ KillaHosting
- ↳ Marketing etc.
- ↳ Staff Issues
- ↳ Reference & Software
- ↳ Archives
- ↳ KillaBlogs
- ↳ Journalism
- ↳ Trash Can
