eHow launches Android app: Get the best of eHow on the go.
Summary: When creating a table in MySQL, make the table before opening a parenthesis to put in the fields that exist in the table. Make a new table in SQL with tips from a software developer in this free video on using MySQL.
Dave Andrews is a software developer with a business and Web site selling programs and other computer services in Franklin, Tenn. Having worked in the IT industry for more than 8...read more
"Hi, my name is Dave Andrews. Today I'm going to show you how to create a table in MySQL. Let's go to the computer where I have a command line interface opened up. And I'm going to log in to MySQL server. To do so, let's just type mysql space dash u and the user we want to log in as. I'm just going to do root. Now the dash p is going to tell it to ask me for my password. See there's the password. Now I'm going to type show databases, which gives me a listing of the databases that exists that I can create tables within. I'm going to do... I'm going to create a table within mydatabase. So let's say mydatabase. Oh, I put databases, so use mydatabase. Now it says database changed. We're going to create our table. Just say create table, let's call it mytable. Now do an opening parenthesis and we're going to put in the fields that exist in this table. I'm going to create and id field that is an integer. It's also the primary key for that database and automatically increments. So the way you do automatically incrementing on your id is you have to make it a primary key, and then say auto underscore increment. Let's do a comma for our next field. And I'm going to say mytext and I'm just going to make that a text type. Let's do a closing parenthesis and a semi-colon. As you can see our table has just been created. I can type describe my table and that gives me information about that table. My name is Dave Andrews and I've just showed you how to create a new table in MySQL."
eHow Article: Creating a Table in MySQL