DELETE in SQL does not run

Asked

Viewed 405 times

0

I’m trying to delete lines from an SQL Express database, but unfortunately I can’t do it. The query is one of those really basic, but after running it I get the message from 'executing query' in SQL Server Management Studio indefinitely, but never ends.

The query is the following:

DELETE FROM table_name 
WHERE condition;
  • Does the table have a trigger? Or is it being used by another process?

  • You need to see if you have any other sessions in management studio with pending operations blocking delete. Try clicking on the "Activity Monitor" icon (Ctrl+Alt+A) and see the Processes tab, and you’ll see who’s blocking you

  • I don’t know what’s trigger, can give me a light?

  • @Renatoafonso were pending operations that were delaying the execution of the query, thanks for the suggestion, unaware of the 'Activity Monitor', mt top!

  • Always at the orders... :) Ps: mark as answered

  • @Renatoafonso so que possa marque como responder you have transform your comment in response.

  • @ihavenokia Trigger

Show 2 more comments

1 answer

6


You need to see if you have other sessions in management studio with pending operations blocking delete. Try clicking on the icon Activity Monitor or Ctrl + Alt + To and see the Processes tab, and see who’s blocking you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.