Chapter 3 DBMS Reference Guide


Common entries for Sequence

You can define values for the following common entries for the Sequence object in the DBMS definition.

Entry Example (Oracle 8)
Enable
Enable = Yes
Create
create sequence %SQNC%
[%OPTIONS%]
Drop
drop sequence %SQNC%
Options
<initial> : composite=yes
{
increment by %d
start with %d
}
<maxvalue> : composite=yes
{
maxvalue %d
nomaxvalue
}
<minvalue> : composite=yes
{
minvalue %d
nominvalue
}
<cycle> %s : list= cycle | nocycle
<cache> : composite=yes
{
cache %d
nocache
}
<order> %s : list= order | noorder
DefOptions
_
SqlListQuery
{SQNC}
SELECT sequence_name
FROM user_sequences
ORDER BY sequence_name
SqlAttrQuery
{SQNC ID, OPTIONS ...}

select
sequence_name,
' increment by ' || increment_by ||
decode(max_value, 999999999999999999999999999, ' nomaxvalue ', -1 , ' nomaxvalue ' ,' maxvalue ' || max_value ) ||
decode(min_value, 1, ' nominvalue ', -99999999999999999999999999, ' nominvalue ' , ' minvalue ' || min_value ) ||
decode(cycle_flag, 'N' , ' nocycle ', ' cycle ') ||
decode(cache_size, 20, '', 0, ' nocache ', ' cache ' || cache_size) ||
decode(order_flag, 'N', ' noorder ', 'order')
from 
user_sequences
order by 1
Rename
rename %OLDNAME% to %NEWNAME%
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".

 


Copyright (C) 2005. Sybase Inc. All rights reserved.