Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 11895
  • Last Modified:

Drop column in SQL Server 2005

I'm trying to delete a column titled "age" from a table. I could swear I used this little query earlier and it worked, but it's not working now.

ALTER TABLE fieldreps
    DROP COLUMN age

I get this error message:
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near ' '

How should the query go?

Thanks,
John
0
gabrielPennyback
Asked:
gabrielPennyback
2 Solutions
 
chapmandewCommented:
your syntax is actually correct...are you sure you're not running anything else along with it?  do you have any ddl triggers enabled?
0
 
MohammedUCommented:
It is correct and working fine...nothing wrong with the syntax...first try to run only ALTER TABLE statement without mixing with other statements by highlighting it...and see what you get...if it works then other statements might be cuaseing this issue...

Make sure you don't have any special hidden character...
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now