SQL Server: Remove foreign key

1152555 pts.
Tags:
SQL Query
SQL Server
On my SQL Server, I have to remove the foreign key from one of my tables so I can insert different values. What SQL query should I use for this? Thank you very much for your help.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

You don’t use a query, you use a DDL statement:

ALTER TABLE <YOUR_TABLE> DROP CONSTRAINT <YOUR_CONSTRAINT>

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    What version are you using? Do you want to do this using a command or using the management studio?
    135,365 pointsBadges:
    report
  • ToddN2000
    Have you checked out Microsoft's link for this?

    LINK
    135,365 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: