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 |
nextaxtion
Yak Posting Veteran
54 Posts |
Posted - 2014-12-21 : 10:44:30
|
hi team,i need to insert some records and loop through inserted records also several dml need to perform on that on the fly. Which temp table i should use table variable or temp table. Records count not more than 5 thousands.Also suggest me except this scenario when to use temp or derived table.prithvi nath pandey |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-12-21 : 16:18:20
|
Use table var when either query is simple or table is small. 5000 is small enough. Depends on what you will do with it. |
|
|
nextaxtion
Yak Posting Veteran
54 Posts |
Posted - 2014-12-22 : 01:37:08
|
why?? when data is small then temp table works bad ??? pls explainprithvi nath pandey |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
|
|
|
|