Drop field with constraint

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Apr 3 00:38:54 CST 2004


On 4/3/04 12:33 AM, "bog at ukrcom.kherson.ua" <bog at ukrcom.kherson.ua> wrote:

>> Interesting.
>> 
>>    try ALTER TABLE DROP COLUMN CASCADE
>>  
> 
> I find next in doc for MS
> 
> DROP { [CONSTRAINT] constraint_name | COLUMN column_name }
> 
> Specifies that constraint_name or column_name is removed from the table.
> DROP COLUMN is not allowed if the compatibility level is 65 or earlier.
> Multiple columns and constraints can be listed. A column cannot be dropped
> if it is: 
> 
> - A replicated column.
> - Used in an index.
> - Used in a CHECK, FOREIGN KEY, UNIQUE, or PRIMARY KEY constraint.
> - Associated with a default defined with the DEFAULT keyword, or bound to a
> default object.
> - Bound to a rule.

Strange, I am not agree.

So if I have index on field, I cannot drop field,
And must at first drop index manually?!

But this is stupid IMHO.

This is like if require delete each field before drop the whole table.

And again, in SQL92 exist syntax CASCADE / RESTRICT.
We can discuss all this on seminar.

I think we must delete all related constraints.
I.e. On default provide CASCADE behavior.


>> ----
>> I think into 
>> 
>>     Table::DropField()
>> 
>> We must add paramter
>> 
>>     Table::DropField( inDeletionControl )
>> 
>> 
>> Btw, I do not remember if our grammar implements CASCADE.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina-beta mailing list