Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 SQL Manual » DDL Statements » CREATE TABLE |
CREATE [TEMPORARY] TABLE <Name> [[( <ColumnName> <ColumnDefinition>| LIKE <LikeDefinition>| [CONSTRAINT <ConstraintName>] <ConstraintDefinition>] [,<ColumnName> <ColumnDefinition>| LIKE <LikeDefinition>| [CONSTRAINT <ConstraintName>] <ConstraintDefinition>] )] [AS <QueryExpression> WITH DATA|WITH NO DATA] [FROM PUBLISHED UPDATES [TABLES <TableName> [,<TableName>]]] | [FROM UPDATES <UpdateName> IN STORE <StoreName>]] [DESCRIPTION <Description>] [VERSION <VersionNumber>] [READONLY|READWRITE] [ENCRYPTED|UNENCRYPTED] [INDEX PAGE SIZE <IndexPageSize>] [BLOB BLOCK SIZE <BLOBBlockSize>] [PUBLISH BLOCK SIZE <PublishBlockSize>] [PUBLISH COMPREESSION <Compression>] [MAX ROW BUFFER SIZE <MaxRowBufferSize>] [MAX INDEX BUFFER SIZE <MaxIndexBufferSize>] [MAX BLOB BUFFER SIZE <MaxBLOBBufferSize>] [MAX PUBLISH BUFFER SIZE <MaxPublishBufferSize>] [ATTRIBUTES <CustomAttributes>] <ColumnDefinition> = <DataType> [COMPRESSION <Compression>] [GENERATED <GenerationOptions>|COMPUTED <ComputationOptions>| DEFAULT <DefaultExpression>] [NOT NULL [ERROR CODE <ErrorCode> MESSAGE <ErrorMessage>]] [<ColumnConstraintDefinition>] [<ColumnConstraintDefinition>] [DESCRIPTION <Description>] <ErrorCode> = Any user-defined (10000-High(INTEGER)) error code <DataType> = CHARACTER|CHAR [(<Length>]) [<CollationName>] CHARACTER VARYING|VARCHAR [(<Length>]) [<CollationName>] GUID BYTE [(<LengthInBytes>]) BYTE VARYING|VARBYTE [(<LengthInBytes>]) BINARY LARGE OBJECT|BLOB CHARACTER LARGE OBJECT|CLOB [<CollationName>] BOOLEAN|BOOL SMALLINT INTEGER|INT BIGINT FLOAT [(<Precision>,<Scale>)] DECIMAL|NUMERIC [(<Precision>,<Scale>)] DATE TIME TIMESTAMP INTERVAL YEAR [TO MONTH] INTERVAL MONTH INTERVAL DAY [TO HOUR|MINUTE|SECOND|MSECOND] INTERVAL HOUR [TO MINUTE|SECOND|MSECOND] INTERVAL MINUTE [TO SECOND|MSECOND] INTERVAL SECOND [TO MSECOND] INTERVAL MSECOND <Compression> = 0..9 <GenerationOptions> = ALWAYS AS <GenerateExpression>| ALWAYS AS IDENTITY (START WITH <SeedValue>, INCREMENT BY <IncrementValue>)| BY DEFAULT AS IDENTITY (START WITH <SeedValue>, INCREMENT BY <IncrementValue>) <GenerateExpression> = Any valid SQL expression that does not include any sub-queries <ComputationOptions> = ALWAYS AS <ComputeExpression> <ComputeExpression> = Any valid SQL expression that does not include any sub-queries or user-defined function references <DefaultExpression> = Any valid SQL expression that does not include any sub-queries <ColumnConstraintDefinition> = CHECK <CheckExpression> PRIMARY KEY| UNIQUE| REFERENCES <TableName> [(<ColumnName> [,<ColumnName>])] [ON UPDATE RESTRICT|ON DELETE RESTRICT] [ERROR CODE <ErrorCode> MESSAGE <ErrorMessage>] <CheckExpression> = Any valid SQL expression that does not include any sub-queries <ErrorCode> = Any user-defined (10000-High(INTEGER)) error code <LikeDefinition> = <TableName> [INCLUDING|EXCLUDING IDENTITY] [INCLUDING|EXCLUDING DEFAULTS] [INCLUDING|EXCLUDING GENERATED] <ConstraintDefinition> = CHECK <CheckExpression> PRIMARY KEY (<ColumnName> [,<ColumnName>])| UNIQUE (<ColumnName> [,<ColumnName>])| FOREIGN KEY (<ColumnName> [,<ColumnName>]) REFERENCES <TableName> [(<ColumnName> [,<ColumnName>])] [ON UPDATE RESTRICT|ON DELETE RESTRICT] [ERROR CODE <ErrorCode> MESSAGE <ErrorMessage>] [DESCRIPTION <Description>] <CheckExpression> = Any valid SQL expression that does not include any sub-queries <ErrorCode> = Any user-defined (10000-High(INTEGER)) error code
"TableName" VARCHAR(40) COLLATE "ANSI_CI", "UpdateType" VARCHAR(15) COLLATE "ANSI_CI", "UpdateTimeStamp" TIMESTAMP, "Manifest" CLOB COLLATE "ANSI_CI", "KeyData" CLOB COLLATE "ANSI_CI", "RowData" CLOB COLLATE "ANSI_CI"
UpdateType | Description |
Insert | The update is an insert operation. The RowData column will contain a CRLF-delimited list of column:value pairs. |
Update | The update is an update operation. The KeyData column will contain a CRLF-delimited list of primary key column:value pairs, and the RowData column will contain a CRLF-delimited list of column:value pairs. |
Delete | The update is an update operation. The KeyData column will contain a CRLF-delimited list of primary key column:value pairs. |
-- The following statement creates the Customer table CREATE TABLE "Customer" ( "ID" INTEGER GENERATED ALWAYS AS IDENTITY (START WITH 0, INCREMENT BY 1), "Name" VARCHAR(30) COLLATE "ANSI_CI", "Address1" VARCHAR(40) COLLATE "ANSI_CI", "Address2" VARCHAR(40) COLLATE "ANSI_CI", "City" VARCHAR(30) COLLATE "ANSI_CI", "State" CHAR(2) COLLATE "ANSI_CI", "Zip" CHAR(10) COLLATE "ANSI_CI", "CreatedOn" TIMESTAMP DEFAULT CURRENT_TIMESTAMP, CONSTRAINT "ID_PrimaryKey" PRIMARY KEY ("ID"), CONSTRAINT "ID_Check" CHECK (ID IS NOT NULL), CONSTRAINT "Name_Check" CHECK (Name IS NOT NULL) ) -- The following statement creates a temporary table containing -- the contents of an update file CREATE TEMPORARY TABLE "MainOfficeUpdates" FROM UPDATES "MainOffice-2010-12-14 17-57-12.0306" IN STORE MainUpdates
Deviation | Details |
Column COMPUTED | The column COMPUTED clause is an ElevateDB extension. |
Column ERROR CODE/MESSAGE | The column ERROR CODE/MESSAGE clause is an ElevateDB extension. |
Column DESCRIPTION | The column DESCRIPTION clause is an ElevateDB extension. |
Column COMPRESSION | The column COMPRESSION clause is an ElevateDB extension. |
Constraint ON UPDATE | The only option supported for the ON UPDATE clause is the RESTRICT option. |
Constraint ON DELETE | The only option supported for the ON DELETE clause is the RESTRICT option. |
Constraint ERROR CODE/MESSAGE | The constraint ERROR CODE/MESSAGE clause is an ElevateDB extension. |
Constraint DESCRIPTION | The constraint DESCRIPTION clause is an ElevateDB extension. |
DESCRIPTION | The DESCRIPTION clause is an ElevateDB extension. |
VERSION | The VERSION clause is an ElevateDB extension. |
ENCRYPTED | The ENCRYPTED and UNENCRYPTED clauses are an ElevateDB extension. |
INDEX PAGE SIZE | The INDEX PAGE SIZE clause is an ElevateDB extension. |
BLOB BLOCK SIZE | The BLOB BLOCK SIZE clause is an ElevateDB extension. |
PUBLISH BLOCK SIZE | The PUBLISH BLOCK SIZE clause is an ElevateDB extension. |
PUBLISH COMPRESSION | The PUBLISH COMPRESSION clause is an ElevateDB extension. |
MAX ROW BUFFER SIZE | The MAX ROW BUFFER SIZE clause is an ElevateDB extension. |
MAX INDEX BUFFER SIZE | The MAX INDEX BUFFER SIZE clause is an ElevateDB extension. |
MAX BLOB BUFFER SIZE | The MAX BLOB BUFFER SIZE clause is an ElevateDB extension. |
MAX PUBLISH BUFFER SIZE | The MAX PUBLISH BUFFER SIZE clause is an ElevateDB extension. |
ATTRIBUTES | The ATTRIBUTES clause is an ElevateDB extension. |
FROM PUBLISHED UPDATES | The FROM PUBLISHED UPDATES clause is an ElevateDB extension. |
FROM UPDATES | The FROM UPDATES clause is an ElevateDB extension. |
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |