<p>I have created a foreign key (in SQL Server) by:</p>

<pre><code>alter table company add CountryID varchar(3);
alter table company add constraint Company_CountryID_FK foreign key(CountryID) 
references Country;
</code></pre>

<p>I then run this query:</p>

<pre><code>alter table company drop column CountryID;
</code></pre>

<p>and I get this error:</p>

<blockquote>
  <p><em>Msg 5074, Level 16, State 4, Line 2<br>
  The object 'Company_CountryID_FK' is dependent on column 'CountryID'.<br>
  Msg 4922, Level 16, State 9, Line 2<br>
  ALTER TABLE DROP COLUMN CountryID failed because one or more objects access this column</em></p>
</blockquote>

<p>I have tried this, yet it does not seem to work:</p>

<pre><code>alter table company drop foreign key Company_CountryID_FK; 
alter table company drop column CountryID;
</code></pre>

<p>What do I need to do to drop the <code>CountryID</code> column?</p>

<p>Thanks.</p>

Try
```
```
alter table company drop constraint Company_CountryID_FK

alter table company drop column CountryID
```
```