unable to delete the records in table

  • Hi Team,

    I have small issue in production server iam unable to delete records

    Query:delete from mytable where empid=400(it's keep on running)

    mytable has:primary key with identity column,relation also there

    can you please help me .

    Thanks

    Ram

  • Not sure what "unable to delete records" means. Does your statement error out or are you rolling it back before it finishes?

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • Ram,

    Is there any connection/transaction blocking your table? Give a look at Active Monitor (or sp_who)...

    Rafael Melo

    Brazil.

  • The DELETE statement may fail if it violates a trigger or tries to remove a row referenced by data in another table with a FOREIGN KEY constraint. Check one of this condition may be true.

    EnjoY!

    EnjoY!
  • As mentioned by others, do you get an error when executing the stmt or it takes time ?

    How many rows are you going to be deleted coz of that stmt ?


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply