background image
<< column-Name | view-Name >>

new-table-Name

<< column-Name | view-Name >>
Derby Reference Manual
20
new-table-Name
A new-table-Name represents a renamed table. You cannot qualify a new-table-Name
with a schema-Name.
Syntax
SQL92Identifier
Example
-- FlightBooks is a new-table-Name that does not include a schema-Name
RENAME TABLE FLIGHTAVAILABILITY TO FLIGHTAVAILABLE
schemaName
A schemaName represents a schema. Schemas contain other dictionary objects, such
as tables and indexes. Schemas provide a way to name a subset of tables and other
dictionary objects within a database.
You can explicitly create or drop a schema. The default user schema is the APP schema
(if no user name is specified at connection time). You cannot create objects in schemas
starting with SYS.
Thus, you can qualify references to tables with the schema name. When a schemaName
is not specified, the default schema name is implicitly inserted. System tables are placed
in the SYS schema. You must qualify all references to system tables with the SYS
schema identifier. For more information about system tables, see
Derby system tables
.
A schema is hierarchically the highest level of dictionary object, so you cannot qualify a
schemaName.
Syntax
SQL92Identifier
Example
-- SAMP.EMPLOYEE is a table-Name qualified by a schemaName
SELECT COUNT(*) FROM SAMP.EMPLOYEE
-- You must qualify system catalog names with their schema, SYS
SELECT COUNT(*) FROM SYS.SysColumns
Simple-column-Name
A Simple-column-Name is used to represent a column when it cannot be qualified by a
table-Name or correlation-Name. This is the case when the qualification is fixed, as it is in
a column definition within a CREATE TABLE statement.
Syntax
SQL92Identifier
Example
-- country is a Simple-column-Name
CREATE TABLE CONTINENT (COUNTRY VARCHAR(26) NOT NULL PRIMARY KEY,
COUNTRY_ISO_CODE CHAR(2), REGION VARCHAR(26))
synonym-Name