Most of your time when working with the SQL Server Management Studio you will be writing and modifying queries.

A common scenario is you want to move around the lines in a query.

So assuming we have this query:

SELECT
    Countries.CountryID,
    Countries.Name,
    Countries.Code,
    Countries.EditUserID,
    Countries.DateModified,
    Countries.CreateUserID,
    Countries.DateCreated,
    Countries.Approved,
    Countries.ApprovedUserID,
    Countries.DateApproved
FROM
    dbo.Countries;

If we want to change the order of Name and Code we would have to:

  1. Highlight the row with Code
  2. Cut (Ctrl + C)
  3. Move the cursor up ⬆
  4. Press Enter
  5. Paste (Ctrl + V)
  6. Move the cursor 2 lines down ⬇⬇
  7. Delete the blank line ❌

Alternatively, you can hold down ALT and move the current line with the cursor up ⬆ or down ⬇ with the keyboard arrows.

Like so:

Lightning fast.

Happy hacking!