Chapter 3 DBMS Reference Guide
The column check parameters are defined in separate rules in the create table
for Sybase SQL Server 4.x and Microsoft SQL Server. When a column has a specific rule defined in its check parameters, these DBMS create a name for this column rule.
The corresponding variable is %RULE%
In Sybase Adaptive Server Enterprise 11:
ColnRuleName = R_%.19:COLUMN%_%.8:TABLE%
The column Speciality (TEASPE) of the table Team has a list of values defined in its check parameters: Industry, Military, Nuclear, Bank, Marketing.
The following rule name, R_TEASPE_TEAM, is created and associated with the TEASPE column:
create rule R_TEASPE_TEAM as @TEASPE in ('Industry','Military','Nuclear','Bank','Marketing') go execute sp_bindrule R_TEASPE_TEAM, "TEAM.TEASPE" go
Copyright (C) 2005. Sybase Inc. All rights reserved. |