Transact-SQL is an actively used query language created in 1984. Transact-SQL (T-SQL) is Microsoft's and Sybase's proprietary extension to the SQL (Structured Query Language) used to interact with relational databases. T-SQL expands on the SQL standard to include procedural programming, local variables, various support functions for string processing, date processing, mathematics, etc. and changes to the DELETE and UPDATE statements. Read more on Wikipedia...

35Years Old 2,390Users 44Jobs

Example code from Wikipedia:

-- begin transaction
BEGIN TRAN

BEGIN TRY
   -- execute each statement
   INSERT INTO MYTABLE(NAME) VALUES ('ABC')
   INSERT INTO MYTABLE(NAME) VALUES ('123')

   -- commit the transaction
   COMMIT TRAN
END TRY
BEGIN CATCH
   -- roll back the transaction because of error
   ROLLBACK TRAN
END CATCH

Last updated August 22nd, 2019