0

I did an ALTER VIEW command and it broke my view. I want to ROLLBACK but don't know how to do this in SQL Server.

Should I just close management studio and not save anything.

Would this fix it and rollback by itself, or does it COMMIT automatically every time I click EXECUTE?

Angelina
  • 2,175
  • 10
  • 42
  • 82
  • 1
    By default, SQL Server runs in Autocommit mode. Unless you've taken steps to change it, that's what mode your session was running in. – Damien_The_Unbeliever Nov 19 '13 at 15:58
  • 1
    if you have backup(s) you can restore your view, or CTRL+Z in SSMS if still have the screen open and re-execute ALTER with the unmodified VIEW. Otherwise you should post a new question on SO asking how to create a view which displays this and that data in the format you like (i.e. ask the community to help you restore the original view). –  Nov 19 '13 at 16:57

0 Answers0