Changes

Jump to: navigation, search

Creating New Databases and Tables with MySQL Administrator

17 bytes removed, 20:31, 27 September 2007
Creating New Tables
Begin by entering the name of the table (which we will call ''customer'') in the ''Table name:'' field and, optionally, a comment to describe the purpose of the table. The next task is to begin adding columns.
To add a column, click on the diamond icon in the ''Column Name'' column of the table so that the various fields in the ''Column Details'' area of the screen enable. Enter ''customer_id'' as the name of the first column. Select ''Numeric'' from the ''Data Type'' drop down menu. The customer ID will be our primary key (see [[Database Basics]] for a description of primary keys) and will also automatically generated for us as rows are added to the database. Enter 0 as the default value and select Select the ''Primary Key'' and ''Auto Increment'' check boxesto reflect this. When completed the ''Column Details'' should appear as follows:
[[image: mysql_admin_column_details.jpg]]

Navigation menu