Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Field from Table

Status
Not open for further replies.

Rjc8513

Technical User
Feb 12, 2001
140
US
How can I delete a field from an existing table?

I have combined the contents of fldA and fldB into fldB and now I want to remove fldA from the table.

Thanks.
 
Code:
ALTER TABLE myTable DROP COLUMN fldA

should do it unless the field is involved in a relationship or is part of the primary key in which case you first need to drop the relations and/or change the keys.
 
Thanks Golom, that did it!

Here's the code that successfully deleted the field:

dbs.Execute "ALTER TABLE [myTable] " & _
"DROP COLUMN " & fldA & ";"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top