osql (http://msdn.microsoft.com/en-us/library/aa214012%28SQL.80%29.aspx) or SQLCMD (http://msdn.microsoft.com/en-us/library/ms162773.aspx) are the equivalent command line tools in SQL Server. I guess Management Studio (SSMS), might be considered the client as well.
SSMS is a GUI client.
SQLCMD and OSQL are command line tools.
answered Oct 12, 2009 at 12:38 PM
Steve Jones - Editor ♦♦
For error checking purposes you might want to look into the TRY/CATCH block:
But in T-SQL (Transact SQL) we do have the ROLLBACK TRANSACTION like you posted above:
answered Oct 12, 2009 at 12:40 PM
Some T-SQL editors include a test mode that will wrap your statements in BEGIN / ROLLBACK statements for you (with varying degrees of protection to what you are doing within those statements). SSMS certainly doesn't have it built in - I'm not sure if any plug-ins give you that functionality off the top of my head.
answered Oct 12, 2009 at 12:37 PM
Matt Whitfield ♦♦