Board index » delphi » Table constraints versus column constraints

Table constraints versus column constraints

I couldn't get the difference between table constraints and column
constraints from the doc. Anybody care to explain ? It seems as if all
constraints refer to columns so I am confused by the idea of table
constraints.
 

Re:Table constraints versus column constraints


Quote
"Bill Todd" <b...@notthis.dbginc.com> wrote in message

news:23neou4uhc5b4c9f38hjdmftortopmrric@4ax.com...

Quote
> A column constraint is on that can be declared as part of the
> declaration for the column. A table constraint is declared for the
> table as a whole. You can declare a single field primary key as a
> column constraint but a multi-field primary key must be declared as a
> table constraint.

That makes sense. Evidently table constraints can refer to more than one
column while column constraints can only refer to the column for which the
constraint applies.
Quote

> On Tue, 17 Sep 2002 12:02:30 -0400, "Edward Diener"
> <eddie...@tropicsoft.com> wrote:

> >I couldn't get the difference between table constraints and column
> >constraints from the doc. Anybody care to explain ? It seems as if all
> >constraints refer to columns so I am confused by the idea of table
> >constraints.

Re:Table constraints versus column constraints


A column constraint is on that can be declared as part of the
declaration for the column. A table constraint is declared for the
table as a whole. You can declare a single field primary key as a
column constraint but a multi-field primary key must be declared as a
table constraint.

On Tue, 17 Sep 2002 12:02:30 -0400, "Edward Diener"

Quote
<eddie...@tropicsoft.com> wrote:
>I couldn't get the difference between table constraints and column
>constraints from the doc. Anybody care to explain ? It seems as if all
>constraints refer to columns so I am confused by the idea of table
>constraints.

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

Re:Table constraints versus column constraints


On Tue, 17 Sep 2002 14:43:49 -0400, "Edward Diener"

Quote
<eddie...@tropicsoft.com> wrote:
>"Bill Todd" <b...@notthis.dbginc.com> wrote in message
>news:23neou4uhc5b4c9f38hjdmftortopmrric@4ax.com...
>> A column constraint is on that can be declared as part of the
>> declaration for the column. A table constraint is declared for the
>> table as a whole. You can declare a single field primary key as a
>> column constraint but a multi-field primary key must be declared as a
>> table constraint.

>That makes sense. Evidently table constraints can refer to more than one
>column while column constraints can only refer to the column for which the
>constraint applies.

Exactly.

Quote

>> On Tue, 17 Sep 2002 12:02:30 -0400, "Edward Diener"
>> <eddie...@tropicsoft.com> wrote:

>> >I couldn't get the difference between table constraints and column
>> >constraints from the doc. Anybody care to explain ? It seems as if all
>> >constraints refer to columns so I am confused by the idea of table
>> >constraints.

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

Other Threads