Chapter 3 DBMS Reference Guide
For a domain or a column, standard check fields can indicate minimum, maximum, and default values, as well as a list of values.
In general, if the domain or column data type is a string data type, quotation marks surround these values in the generated script. However, quotation marks are not generated in the following cases:
In addition, if the value is already surrounded by quotation marks additional quotation marks are not generated.
The generation of single- or double-quotation marks depends on the current DBMS.
The DBMS lists reserved keywords as values for the field ReservedDefault, under the category Keywords.
The following example shows the result of a reserved keyword for the DBMS Sybase AS Anywhere 6.
Sybase AS Anywhere 6 DBMS contains the following lines:
ReservedDefault = NULL AUTOINCREMENT CURRENT DATE CURRENT PUBLISHER CURRENT TIME CURRENT TIMESTAMP CURRENT USER LAST USER USER
You define CURRENT DATE as the default value of a column:
The resulting script contains the string CURRENT DATE without quotation marks.
create table SALE ( SALE_ID T_IDENTIFIER not null, STOR_ID T_AN_IDENTIFIER not null, TITLE_ISBN char(12) not null, SALE_DATE T_DATE not null default CURRENT DATE, SALE_AMOUNT T_AMOUNT , SALE_TERMS T_LONG_TEXT , SALE_QTY T_QUANTITY , primary key (SALE_ID) );
When you run this script, Sybase Adaptive Server Anywhere will recognize CURRENT DATE as a reserved default value.
Copyright (C) 2005. Sybase Inc. All rights reserved. |
![]() |