Re: how to drop constraints

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Itzik Ben-Gan (itzik_at_REMOVETHIS.SolidQualityLearning.com)
Date: 10/05/04


Date: Mon, 4 Oct 2004 17:54:00 -0700

The syntax for dropping a constraint is:

ALTER TABLE <table_name> DROP CONSTRAINT <cns_name>

If you don't know the name of the constraint, use:

EXEC sp_helpconstraint <table_name>

-- 
BG, SQL Server MVP
www.SolidQualityLearning.com
"tchangmian" <tchangmian@yahoo.com.sg> wrote in message 
news:6447ee25.0410041647.3c41824e@posting.google.com...
> Hi,
> I would like to ask for help for how to drop constraints within a
> table. For example, i have a table called A, i want to drop the
> constraints within the table while the table is not been dropped.
> Could anyone know how to write the syntax for dropping constraints by
> using stored procedure? 


Relevant Pages

  • Pythonification of the asterisk-based collection packing/unpacking syntax
    ... packing and unpacking syntax. ... In case the asterisk is not used to signal unpacking, ... type constraints throughout python as a whole; ...
    (comp.lang.python)
  • Re: macro preprocessor semantics and the ANSI standard
    ... 'constraints' are not part of the syntax, but part of the semantics ... They are part of the syntax, but it's easier to impose them as ... Unsolicited bulk E-mail subject to legal action. ...
    (comp.lang.pl1)
  • Re: subroutine stack and C machine model
    ... You stated elsewhere that constant expressions are a ... section so presumably you include in "syntax" the constraints whilst ... Rather, I believe that, if you follow the syntax down far ... support such a rigid distinction. ...
    (comp.lang.c)
  • Re: Implicit Declaration
    ... constraint violation or a syntax violation ... The standard certainly treats them differently, putting syntax rules ... places constraints in sections named "Constraints". ...
    (comp.lang.c)
  • Re: subroutine stack and C machine model
    ... You stated elsewhere that constant expressions are a ... section so presumably you include in "syntax" the constraints whilst ... Rather, I believe that, if you follow the syntax down far ... was your canonical non-syntactic distinction. ...
    (comp.lang.c)