Creating a Table in Table Editor
In this example we will create a new table that does not contain any data. Nevertheless, while creating the table you must decide what types of data you want to store in it. The data is held in fields, and each field can be declared as one of the data types that are available.
The sakila database contains the film table. We are going to create a table that will store film ratings descriptions.
To create a table:
- You must be connected to a database.
- In Database Explorer, double-click a required database wherein you need to create a table.
Right-click the Tables folder and select the New Table. The Table Editor opens.
- In the Name text box, enter a table name. You can give it a name such as ratings_description.
- In the grid below, click the first empty cell and enter the column name. You can give it a name such as as id. Notice that the data type for that column is defined automatically. Select the check box next to id, in order to set this column as the primary key.
- Click the next empty cell and enter the column name. You can give it a name such as description. Notice that the data type for that column is defined automatically.
Click Update Database.
The new empty table is created. It now appears in Database Explorer in the Tables folder.