SQL ISNT RESPONDING

Maninder Karjee 0 Reputation points
2026-08-22T12:24:23.3733333+00:00

I USE SSMS

SO IN SQL THE PREVIOUS QUERIES GET EXECUTED ALSO THE NEW ONES TOO . BUT WHEN I MODIFY THE PREVIOUS QUERIES THE RESULT REMAINS THE OLD SAME .THEN AFTER THE FEW TIME PERIOD THE SAME PROBLEM HAPPENS TO THE NEW QUERIES THAT I EXECUTED.

EVEN AFTER MANY SAVE AND REFRESH ,THE RESULT IS STILL SAME.

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


2 answers

Sort by: Most helpful
  1. Rukshan edirisinghe 80 Reputation points
    2026-08-23T04:06:16.8+00:00

    Hi @Maninder Karjee ,

    From your description (save and refresh not changing the result), this is almost certainly not SQL Server misbehaving. It's how SSMS works.

    The results grid never updates on its own. Save (Ctrl+S) only saves the .sql file to disk, and Refresh only reloads the Object Explorer tree. Neither of them runs your query. The result you see is always from the last time you pressed Execute. So check these:

    1. After modifying a query, click inside the query window and press Execute (or F5) again. That is the only thing that produces a new result.
    2. Watch out for highlighted text. If any part of the query is selected, Execute runs only the selected portion, not the whole script. So if an old line is still highlighted, you keep re-running the old query. Click once anywhere in the editor to clear the selection, or select the full modified query, then Execute.
    3. Check the database dropdown at the top left of the query window. If it says master or a different database, your query is running against the wrong database, so your changes won't show. Switch it to the correct one or add USE YourDatabaseName at the top.
    4. If what you modified is a view or stored procedure, editing the text isn't enough. You have to execute the ALTER VIEW / ALTER PROCEDURE statement first, then run your SELECT or EXEC again to see the new logic.
    5. Make sure you're executing in the same tab you edited. Each tab has its own results pane, so editing in one tab and reading results in another looks exactly like "nothing changed".

    If instead the query genuinely hangs showing "Executing..." forever, that's a different issue, usually an open transaction in another window holding locks. Run COMMIT or ROLLBACK in the window where you ran a BEGIN TRAN, or close the other windows, and it will unblock.

    If none of these apply, reply with the exact query, which button you press to run it, and a screenshot of the full SSMS window, and we can dig further.

    Was this answer helpful?

    0 comments No comments

  2. Destiny Uge 0 Reputation points
    2026-08-22T18:13:18.7933333+00:00

    If you have multiple queries written in the same query window, SSMS will execute all of them from top to bottom every time you click "Execute" (or press F5).

    The Fix: Use your mouse to click and drag to highlight (select) only the specific query you want to run. When you click Execute, SSMS will only run that highlighted text.

    If your old results are stuck on the screen and never changing, SSMS might be configured to stop sending new results to your grid.

    The Fix: Go to the top menu and select Query > Query Options. Look under Results > Grid and make sure the box for "Discard results after execution" is unchecked.

    Sometimes the SSMS user interface grid gets visually "stuck" and stops rendering the updated data, even though the database is processing it.

    The Fix: Completely close your current query tab (save it first if you need to). Open a brand new query window (Ctrl + N), paste your modified query there, and press F5. This forces SSMS to open a fresh results grid.4. Check for uncommitted transactions (BEGIN TRAN)If you previously ran a query that started with BEGIN TRANSACTION but you never ran COMMIT, your session is locked into a temporary snapshot of the data.The Fix: Open a new query window, type ROLLBACK; and execute it. Then try running your modified query again.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.