23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CREATE TABLE<br />

CREATE TABLE<br />

Syntax<br />

20<br />

RELATED STATEMENT<br />

DROP SYNONYM<br />

Creates a table definition. A table definition consists of a set of named column definitions for<br />

data values that will be stored in rows of the table. <strong>SQL</strong> provides two forms of the CREATE TABLE<br />

statement.<br />

The first syntax form explicitly specifies column definitions. The second syntax form, with the<br />

AS query_expression clause, implicitly defines the columns using the columns in a query<br />

expression.<br />

CREATE TABLE [ owner_name.]table_name<br />

( { column_definition | table_constraint }, ...)<br />

[ AREA area_name ]<br />

[ ENCRYPT WITH cipher ]<br />

[ BUFFER_POOL { PRIMARY | ALTERNATE } ]<br />

[ progress_table_attribute_keyword value ]<br />

;<br />

CREATE TABLE [ owner_name.]table_name<br />

[ (column_name [ NOT NULL] , ... ) ]<br />

[ AREA area_name ]<br />

[ ENCRYPT WITH cipher ]<br />

[BUFFER_POOL { PRIMARY | ALTERNATE } ]<br />

AS query_expression<br />

;<br />

owner_name<br />

Specifies the owner of the table. If the name is different from the user name of the user<br />

executing the statement, then the user must have DBA privileges.<br />

table_name<br />

Names the table you are defining.<br />

column_definition<br />

This is the syntax for column_definition:<br />

Syntax<br />

column_name data_type<br />

[ COLLATE case_insensitive | case_sensitive ]<br />

[ DEFAULT { literal | NULL | SYSDATE | SYSTIME | SYSTIMESTAMP } ]<br />

[ column_constraint [ column_constraint , ... ] ]<br />

[ progress_column_attribute_keyword value<br />

[progress_column_attribute_keyword value ] ...]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!