Quick Start
Connect to MySQL
Databases
Tables
Adding Fields and Choosing Data Types
Customising Fields
Primary Keys and Indexes
Filter Wizard
Foreign Keys
Import/Export
Queries
Visual Query Builder
Stored Procedure
Data
Manage Users
Backup
Data Transfer
Schedule
Server Monitor
Maintaining your databases/tables
  Working with Primary Keys and Indexes
 

Set or change the primary key

  1. Open your table in the Table Design Window
  2. Select the Fields tab
  3. Identify the field(s) or insert new field(s) that must be part of the primary key
  4. Click Primary Key button
  5. Click Save or Save As from the toolbar when you are ready to save the table

NOTE: All the fields that must be part of the primary key may not allow Null values

Remove the primary key

  1. Open your table in the Table Design Window
  2. Select the Fields tab
  3. Identify the field(s) that is part of the primary key
  4. Click Primary Key button
  5. Click Save or Save As from the toolbar when you are ready to save the table

Create an index to find and sort records faster

You can index a single field or a combination of fields so that you sort and find records more quickly.

Create a single-field index

  1. Open the table in Design View
  2. Select the Indexes tab
  3. To add a new index definition, click Add Index from the toolbar
  4. In the Index Name column enter the name of the index
  5. Double-click on the Field(s) Name grid
  6. To add a field for the index, enter the field name to the grid
  7. Click Save or Save As from the toolbar when you are ready to save the table

Create a multiple-field index

  1. Open the table in Design View
  2. Select the Indexes tab
  3. To add a new index definition, click Add Index from the toolbar
  4. In the Index Name column enter the name of the index
  5. Double-click on the Field(s) Name grid
  6. To add fields for the index, enter the fields name to the grid.
  7. Click Save or Save As from the toolbar when you are ready to save the table

Delete an index

  1. Open the table in Design View
  2. Select the Indexes tab
  3. Select the index you want to delete and click Delete Index from the toolbar
  4. Click Save or Save As from the toolbar when you are ready to save the table

Prevent duplicate values from being entered in a combination of fields

  1. Open the table in Design View
  2. Select the Indexes tab
  3. To add a new index definition, click Add Index from the toolbar
  4. In the Index Name column enter the name of the index
  5. Double-click on the Field(s) Name grid, add the fields for the index
  6. In the Index Type, select Unique
  7. Click Save or Save As from the toolbar when you are ready to save the table

Prevent duplicate values from being entered into a field

  1. Open the table in Design View
  2. Select the Indexes tab
  3. To add a new index definition, click Add Index from the toolbar
  4. In the Index Name column enter the name of the index
  5. Double-click on the Field(s) Name grid, add a field for the index
  6. In the Index Type, select Unique
  7. Click Save or Save As from the toolbar when you are ready to save the table