Přeskočit na hlavní obsah

DS

Transaction

  • groups set of tasks into single execution unit (if one of them fails, the entire transaction fails)
  • can only result in failure or success

Procedure vs. Function

-Stored ProcedureFunction
ReturnsZero or more valuesA single value (which may be a scalar or a table)
Can use transaction?YesNo
Can output to parameters?YesNo
Can call each other?Can call a functionCannot call a stored procedure
Usable in SELECT, WHERE and HAVING statements?NoYes
Supports exception handling (via try/catch)?YesNo