Drop column in SQL Server 2005

Posted on 2009-02-19
Last Modified: 2012-05-06
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

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

How should the query go?

Question by:gabrielPennyback
    LVL 60

    Accepted Solution

    your syntax is actually correct...are you sure you're not running anything else along with it?  do you have any ddl triggers enabled?
    LVL 15

    Assisted Solution

    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...

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
    INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    26 Experts available now in Live!

    Get 1:1 Help Now