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 |
wkm1925
Posting Yak Master
207 Posts |
Posted - 2010-04-07 : 10:12:57
|
My question as follow,1. How many types of temporary tables exist in SQL Server and how is each type symbolized?2. In cursor, When should they be used instead of set-based statements? |
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2010-04-07 : 10:16:44
|
For question 1 please just look up some reference. In particular in BOL just look for temp table and table variable.question 2:The quick answer is almost never in a production environment from an application. Especially from 2005 and onwards there are new features hat make it easier to avoid loops (CTE / ranking functions for example).If you are a sys admin / dba then they can be pretty useful and quick for situations where you'd want to run a piece of sql on a few different databases for example. Or the classic example is adding a bunch of user roles calling one of the system stored procs.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
wkm1925
Posting Yak Master
207 Posts |
Posted - 2010-04-07 : 13:18:25
|
tq sir |
 |
|
|
|
|