Creating table structure
Before you can insert data into table, you must create its structure. The structure of a table is determined by its columns, with each column in the table set up to handle a particular kind of data. Each column has specific attribute settings.
- Field the name of the column
- Type the data type of the column
- Length/values the appropriate length/values setting for the selected data type
- Attributes any optional attribute you wish to apply (for example, UNSIGNED to only allow zero and positive numbers.)
- Null a keyword which determines if the field for the record can be left blank, set to either NULL (can be empty) or NOT NULL (cannot be empty)
- Default a default value for the column (if one is not provided when the record is inserted into the table)
- Extra use AUTO_INCREMENT to automatically increment the value in an ID field.
To create a table:
- In DBManager Home, select the database into which you want to add the table.
- Click the Manage Database button.
- Enter a name for the table, and specify the number of fields (columns) it will contain.
- Click Go.
- Enter column information.
- Click Save.
phpMyAdmin refreshes and shows the table structure as well as the SQL query used to create it. You are now ready to insert rows (records) into your table.