Click to See Complete Forum and Search --> : MySQL Questions


Joseph Witchard
02-18-2008, 11:37 AM
I'm still real new to all of this. I have two questions about MySQL, and they are:

1) I'm not sure if I'm wording this right, but what do the different types of columns in a table do? I've seen stuff such as text, curdate, etc. Could someone tell me what all of them do, or point me in the right direction to find out?

2) What does it mean when you have a column set to auto-increment?

Thanks!

bflosabre91
02-18-2008, 04:19 PM
auto increment is a field that will start at 0 or 1(i dont remember which) but everytime you insert a new row, it will add 1 to the previous number and be part of the new row.
and if you google MySql datatypes, you should be able to find tons of info on that

TJ111
02-18-2008, 04:22 PM
The different data types in the column let the database know what to expect in the field. For example, 'text' for text, 'int' for integers, 'blob' for files, and so on.

chazzy
02-18-2008, 08:44 PM
MySQL supports many data types, all are mentioned in the documentation.
http://dev.mysql.com/doc/refman/5.0/en/data-types.html

Joseph Witchard
02-18-2008, 10:51 PM
What exactly is the purpose of auto-increment?

chazzy
02-19-2008, 08:09 AM
It's common practice to use a numeric identifier to uniquely identify each item in a table. Making a column auto increment means that the value of this column on the next insert will be the previous value + 1. you therefore would leave this value blank on an insert so that the server can handle it for you.