Chapter 3 DBMS Reference Guide
You can define values for the following common entries for the Column object in the DBMS definition.
Entry | Example (Sybase Adaptive Server Enterprise 11) |
---|---|
Enable | Enable = Yes |
Maxlen | Maxlen = 30 |
Create |
alter table [%QUALIFIER%]%TABLE% add %20:COLUMN% %30:DATATYPE% [default %DEFAULT%] [%IDENTITY%?identity:%NULL%] [[constraint %CONSTNAME%] check (%CONSTRAINT%)] |
Add |
%20:COLUMN% %30:DATATYPE% [default %DEFAULT%] [%IDENTITY%?identity:[%NULL%][%NOTNULL%]] [[constraint %CONSTNAME%] check (%CONSTRAINT%)] |
Drop | In Sybase Adaptive Server Anywhere 6:
alter table [%QUALIFIER%]%TABLE% delete %COLUMN% |
DefOptions | This entry is often empty. It defines options that are applied to columns |
SqlListQuery | In Oracle 8I2:
{OWNER, TABLE, COLUMN, DTTPCODE, LENGTH, SIZE, PREC, NOTNULL (N='NOT NULL', *=NULL), DEFAULT, COMMENT} [%ISODBCUSER% ? SELECT '%SCHEMA%', C.TABLE_NAME, C.COLUMN_NAME, C.DATA_TYPE, C.DATA_PRECISION, C.DATA_LENGTH, C.DATA_SCALE, C.NULLABLE, C.DATA_DEFAULT, M.COMMENTS FROM SYS.USER_COL_COMMENTS M, SYS.USER_TAB_COLUMNS C WHERE M.TABLE_NAME = C.TABLE_NAME AND M.COLUMN_NAME = C.COLUMN_NAME [AND C.TABLE_NAME='%TABLE%'] ORDER BY C.TABLE_NAME, C.COLUMN_ID : SELECT C.OWNER, C.TABLE_NAME, C.COLUMN_NAME, C.DATA_TYPE, C.DATA_PRECISION, C.DATA_LENGTH, C.DATA_SCALE, C.NULLABLE, C.DATA_DEFAULT, M.COMMENTS FROM SYS.ALL_COL_COMMENTS M, SYS.ALL_TAB_COLUMNS C WHERE M.OWNER = C.OWNER AND M.TABLE_NAME = C.TABLE_NAME AND M.COLUMN_NAME = C.COLUMN_NAME [AND C.OWNER='%SCHEMA%'] [AND C.TABLE_NAME='%TABLE%'] ORDER BY C.OWNER, C.TABLE_NAME, C.COLUMN_ID |
SqlAttrQuery | In Oracle 7:
{OWNER, TABLE, COLUMN, COMMENT} select c.owner, c.table_name, c.column_name, m.comments from sys.all_col_comments m, sys.all_tab_columns c where m.owner=c.owner and m.table_name=c.table_name and m.column_name=c.column_name [and c.owner='%SCHEMA%'] [and c.table_name='%TABLE%'] [and c.column_name='%COLUMN%'] |
SqlOptsQuery | — |
SqlFragQuery | — |
Options | In DB2 UDB 6.x common server:
<logged> %s : list=logged|not logged, default=logged <compact> %s : list=compact|not compact, default=not compact linktype url : composite=yes { no link control file link control : composite=yes { mode db2options integrity %s : default=all read permission %s : list=fs|db, default=fs write permission %s : list=fs|blocked, default=fs recovery %s : list=yes|no, default=no on unlink %s : list=restore|delete, default=restore } } |
ModifiableAttributes | List of extended attributes that will be taken into account in the merge dialog box during database synchronization |
ReversedStatements | List of statements that will be reverse engineered |
For a description of each of the common object entries, see section "Common object entries".
In a column, if the type of the default variable is text or string, the query must retrieve the value of the default variable between quotes. Most DBMS automatically add these quotes to the value of the default variable. If the DBMS you are using does not add quotes automatically, you have to specify it in the different queries using the default variable.
For example, in IBM DB2 UDB 8 for OS/390, the following line has been added in SqlListQuery in order to add quotes to the value of the default variable:
... case(default) when '1' then '''' concat defaultvalue concat '''' when '5' then '''' concat defaultvalue concat '''' else defaultvalue end, ...
Copyright (C) 2005. Sybase Inc. All rights reserved. |
![]() |