Creating a Table by Copying an Existing Table

From Apache OpenOffice Wiki
Jump to: navigation, search




Creating a Table by Copying an Existing Table

A situation may arise where you want to have two or more tables with the same structure but different data. Rather than creating each table from the wizard, you can make copies of the original table, naming each differently.

  1. Click on the Tables icon in the Database pane to see the existing tables.
  2. Right-click on the icon of the table you want to copy. Choose Copy from the pop-up menu.
  3. Move the mouse pointer below this table, right-click, and select Paste. The Copy table dialog opens.
  4. Change the table name and click  Next .
  5. Click the  >>  button to move all the fields from the left box to the right box and click  Next .
  6. Since all the fields already have the proper Field type, no changes should be needed. However, this is the time and place to make any changes if they are needed. (See Caution below for the reason.) Click  Create . The new table is created.
Documentation caution.png Once tables have been created using the wizard and data has been entered, editing them should be very limited. Fields can be added or deleted, but adding a field requires taking the time to enter the data for that one field for every record having an entry for that field.

Deleting a field deletes all the data once contained in that field. Changing the field type of field can lead to data being lost, either partially or completely, if the two data types are not compatible. When creating a new table, it pays to create the fields with the correct names, length, and format before you add any data.

Deleting a table removes all the data contained in every field of the table. Unless you are sure, do not delete a table.

Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools