Provides a schema definition for a named window inside a Create Windowstatement, or for a database subquery or remote subquery inside a Query statement, Database statement, or Remote Procedure statement.
Use the SCHEMA clause as part of a Create Window statement and in a database subquery or remote subquery of the FROM clause to define a schema for the named window, database subquery, or remote subquery. The SCHEMA clause can actually define the schema's column names and data types (called an inline schema), or can refer to a named schema, created with a Create Schema statement, or to an external .ccs schema file that contains the column name and data type definitions. You can create an external schema file in Sybase CEP Studio (see the Sybase CEP Studio Guide for more information). If your SCHEMA clause refers to an external file, you must specify the file's absolute path, or its path relative to the module .ccl file that contains the SCHEMA clause.
Create Schema Statement
Create Window Statement
Database Subquery
Remote Subquery
FROM
Here is an example of a SCHEMA clause used in a Create Window statement:
CREATE WINDOW LastDayTrades SCHEMA (Symbol STRING, Price FLoAT) KEEP 1 DAY;
Here is an example of a SCHEMA clause used within a database subquery:
INSERT INTO OutStream SELECT S.Location, S.Name, D.Age FROM RfidStream AS S, (DATABASE "MyDB" SCHEMA 'mydb.ccs' [[SELECT * FROM People WHERE ?S.Name=People.Name ]]) AS D;