Creating and Dropping Tables

Use the standard MySQL commands to create and drop tables in Hyperstage, the same as you would with a MySQL table. For detailed syntax information, see CREATE TABLE Syntax and DROP TABLE Syntax in the MySQL 5.x Reference Manual.

Important: Do not manually copy a data table from one database to another by copying the database files. Internal table numbering errors and Knowledge Grid inconsistencies may occur. To copy a table from one database to another, export from the source database and then import into the target database (see Importing and Exporting Data in WebFOCUS Hyperstage) or back up the entire database directory (see WebFOCUS Hyperstage Backup and Recovery). You can rename the entire database by renaming the folder. However, you should not copy a database folder from one active instance to another, or within the same active instance.

To create a table, enter the following command:

mysql> create table <table_name> (<column(s)>);

To drop a table, enter the following command:

mysql> drop table table_name;

See About Column Options for information on supported and unsupported options when creating columns.

Note: When creating a table, as a matter of practice, you should always use the ENGINE=option to ensure that the correct database engine is used. Hyperstage is shipped with DEFAULT ENGINE = BRIGHTHOUSE, but this can be changed. The name of the engine can be specified explicitly at the end of the create table statement:

mysql> create table <table_name> (<column(s)>) engine=brighthouse;

WebFOCUS