Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

SQL Drop function

  • 12-02-2008 2:28pm
    #1
    Closed Accounts Posts: 5,240 ✭✭✭


    Im trying to delete a field in a table, i just created the table so i know it exits.

    ALTER TABLE Officers
    DROP StaffLinkToAct
    Go

    I get this error:
    Server: Msg 3728, Level 16, State 1, Line 4
    'StaffLinkToAct' is not a constraint.
    Server: Msg 3727, Level 16, State 1, Line 4
    Could not drop constraint. See previous errors.

    Is it trying to tell me this field does not exits? Odd seing as i just created it.


Comments

  • Registered Users, Registered Users 2 Posts: 31 markkilpatrick


    try

    DROP TABLE StaffLinkToAct;


  • Registered Users, Registered Users 2 Posts: 2,013 ✭✭✭lynchie


    try

    DROP TABLE StaffLinkToAct;

    Thats statement is to drop the table. He wants to drop a column.

    Try Alter Table Officers Drop column StaffLinkToAct; I know that works in MySQL


  • Closed Accounts Posts: 5,240 ✭✭✭Endurance Man


    Cheers for the replies lads, that worked a treat lynchie.


  • Registered Users, Registered Users 2 Posts: 31 markkilpatrick


    lynchie wrote: »
    Thats statement is to drop the table. He wants to drop a column.

    Try Alter Table Officers Drop column StaffLinkToAct; I know that works in MySQL

    Should have read it twice before replying. :)


Advertisement