A really silly question

  • Hello.

    Sometimes when working on SQL server, i accidentally press something on my keyboard, after which if i put my mouse cursor in a middle of a string, press any letter or number, and that letter or number will replace a letter that was already in that string, instead of inserting it, and "pushing" the rest of the string to the right, like it normally would.

    I usually just close and reopen MSSQL, cause i don't know how i did that. It must be some keyboard shortcut?

    I hope i explained myself properly!

    Thanks in advance to whoever helps with this nuisance.


    edit: apparently it's the insert button 🙂

    the topic can be closed

    • This topic was modified 1 month ago by  Nighteg. Reason: Solved
  • CTL-Z

    That's undo. It ought to help you. It will immediately undo the last action. If you've done others, it's too late.

    Another option, just close the tab. No need to restart Management Studio (I assume that's what you mean by MSSQL). Close the offending tab and open another.

    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • You've probably either actually hit the INS (insert) key or some combination of keys that does the same thing.  If you look at the bottom of the SSMS code window, you can tell when this happens...

    If it say OVR, then you need to hit the INS key to get it back to the INS mode.  If that doesn't work, you might want to report it as a bug.

    When OVR is active, the cursor will also (normally) change to a Gray rectangle but the real tell is in the graphic above.

    --Jeff Moden

    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "Dear Lord... I'm a DBA so please give me patience because, if you give me strength, I'm going to need bail money too!"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 1 through 3 (of 3 total)

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