|
ColumnA <> ColumnB
|
|||
---|---|---|---|
#18+
Здрасте всем... А можно ли при помощи правила исключить возможность одинаковых значений в двух столбцах одной и той же записи, ну напрмер, ColumnA <> ColumnB ... |
|||
:
Нравится:
Не нравится:
|
|||
22.01.2001, 14:34 |
|
ColumnA <> ColumnB
|
|||
---|---|---|---|
#18+
Нет, ведь правило не знает в какой таблице оно может оказаться. CREATE RULE rule AS condition_expression Arguments rule Is the name of the new rule. Rule names must conform to the rules for identifiers. Specifying the rule owner name is optional. condition_expression Is the condition(s) defining the rule. A rule can be any expression that is valid in a WHERE clause and can include such elements as arithmetic operators, relational operators, and predicates (for example, IN, LIKE, BETWEEN). A rule cannot reference columns or other database objects. Built-in functions that do not reference database objects can be included. condition_expression includes one variable. The at sign (@) precedes each local variable. The expression refers to the value that is entered with the UPDATE or INSERT statement. Any name or symbol can be used to represent the value when creating the rule, but the first character must be @. ... |
|||
:
Нравится:
Не нравится:
|
|||
22.01.2001, 15:51 |
|
ColumnA <> ColumnB
|
|||
---|---|---|---|
#18+
Вообще-то для этой цели обычно CHECK constraint используется. ... |
|||
:
Нравится:
Не нравится:
|
|||
22.01.2001, 18:12 |
|
|
start [/forum/topic.php?desktop=1&fid=46&tid=1827447]: |
0ms |
get settings: |
8ms |
get forum list: |
14ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
26ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
40ms |
get tp. blocked users: |
1ms |
others: | 291ms |
total: | 398ms |
0 / 0 |