In this section, you create a single table in the primary site database, using isql. First, make sure you are connected to the primary site database:
isql -U DBA -P sql -S PRIMEDB
Next, create a table in the database:
CREATE TABLE news ( ID INT, AUTHOR CHAR( 40 ) DEFAULT CURRENT USER, TEXT CHAR( 255 ), PRIMARY KEY ( ID, AUTHOR ) ) go
In SQL Anywhere, all identifiers are case insensitive. In Adaptive Server Enterprise, identifiers are case sensitive by default. Even in SQL Anywhere, ensure the case of your identifiers matches in all parts of the SQL statement to ensure compatibility with Adaptive Server Enterprise.
In SQL Anywhere, passwords are always case sensitive. User IDs, being identifiers, are case insensitive in all SQL Anywhere databases.
For more information, see CREATE DATABASE statement.
For news to act as part of a replication primary site, you must set REPLICATE to ON for the table using an ALTER TABLE statement:
ALTER TABLE news REPLICATE ON go
This is equivalent to running the sp_setreplicate or sp_setreptable procedure on the table in Adaptive Server Enterprise. You cannot set REPLICATE ON in a CREATE TABLE statement.
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|