This topic describes how to:
To create a table, do the following:
On the Start Page, switch to the Database Design tab and click New Database Object.
In the New Object dialog box, select the Table type.
Add columns to the table and specify its properties.
To save the table, click Apply Changes.
-or-
To save the table, click Apply Changes.
-or-
On the Standard toolbar, click New Database Object and select the Table object type from the drop-down list and then follow the steps from the procedure listed above.
Note
To learn more about how to add columns, constraints, or indexes to the table and to define other table parameters, see Defining Table Structure.
Alternatively, you can create a table in the schema using the CREATE statement.
To create a table using the CREATE TABLE statement, do the following:
On the Start Page > SQL Development tab, click SQL Editor.
-or-
On the Standard toolbar, click New SQL.
In the SQL editor, type the query. The syntax is as follows:
CREATE TABLE schema_name.table_name (
column_1 data_type column_constraint,
column_2 data_type column_constraint,
...
table_constraint
);
Note
Keep in mind if you want to create a table in the schema of another user, you should have corresponding privileges. For more information, refer to Granting and Revoking Privileges on Database Objects.
Editing a table implies editing its structure: changing, removing, or adding columns, indexes, modifying table options. Table editor allows performing all these actions and viewing changes in the script of the table.
To edit a table and view changes, do the following:
To save the changes, click Apply Changes. If you want to undo all actions made since table document (or any another object editor) was opened or saved, click Undo on the Standard toolbar. However, you cannot issue the Redo command for database objects, because when you click Undo, a database object is reloaded from server, and all unsaved changes are lost.
Optional: You can alter the table name, change the database (owner), or set a comment for the table.
Note
Keep in mind that to change the database owner, you should have privileges to create database objects in a schema of another user.
To change table data using the UPDATE statement, do the following:
On the Start Page > SQL Development tab, click SQL Editor.
-or-
On the Standard toolbar, click New SQL.
In the SQL editor, type the query. The syntax is as follows:
UPDATE
table_name
SET
column1 = value1,
column2 = value2,
column3 = value3,
...
WHERE
condition;
In the WHERE clause, indicate the condition that determines rows to be updated.
Note
If you ignore the WHERE condition, the specified columns of all rows will be updated.
To drop a table, do the following:
Right-click a required table and then click Delete on the shortcut menu.
Note
While dropping a table, all its data will be lost.
To remove a table from the database, do the following:
On the Start Page > SQL Development tab, click SQL Editor.
-or-
On the Standard toolbar, click New SQL.
In the SQL editor, type the query. The syntax is as follows:
DROP TABLE [schema_name].table_name
[ CASCADE CONSTRAINTS ]
[ PURGE ];