Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-04-17 : 21:27:17
|
| Ira writes "Anyone have any general tips on writing procs? Is it a good idea to put it in a transaction or not? How about set nocount on?CREATE PROCEDURE s_GroupName @Member varchar(10), ASBEGIN TRANSACTION UPDATE MemberStrategyGroup SET StrategyGroupLName = @GroupLName WHERE MemberID = @Member AND StrategyGroupID = @StrategyGroupIDCOMMITGO" |
|
|
dsdeming
479 Posts |
Posted - 2002-04-17 : 21:37:11
|
| By all means set nocount on. However, in the case of a procedure as simple as your listing, no transaction is required as the update is already an atomic transaction. If you have a procedure that makes multiple changes to data, then you should consider transactions. |
 |
|
|
|
|
|