Can I change a table-level check constraint to a column-level constraint?
If so, how? I can see in the alter table command I can drop/add table-level
constraints, but how to make it column specific?
Is there some way to do this with an Alter Table or in Enterprise Manager
without dropping/recreating the table?
I am implementing horizontal partitioning and, as in some examples I have
seen, set up the tables with table-level constraints evaluating the
accounting period (one column, YYYYMM) for the year/month. When I set up my
view to union all the tables, the query plan shows that it is looking at the
clustered index (accounting period is the high-level node of the index) for
each table. When I define the same tables with the check constraint on the
accounting period column itself (rather than table-level constraint), the
query plan operates as it should in this scenario - evaluating the
constraint to include tables in the query plan.