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 |
raam_kimi
Yak Posting Veteran
80 Posts |
Posted - 2006-05-18 : 04:56:37
|
Hi all i am using table varaible insql server to hold the records instead of using temporary table. But am fectching more than 1000 rows for every transaction.So is this a correct method?.. or creating temporary table is a best mehod.and i need to use array type variables in my SP.. is table variable is a best replacement for array....RamLive while u r Alive |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
raam_kimi
Yak Posting Veteran
80 Posts |
Posted - 2006-05-18 : 05:07:44
|
thanks madhi i need one clarification.... if i use table variable for my process.. is it important to drop the table at the end...RamLive while u r Alive |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-05-18 : 05:11:53
|
No need to drop it. It will be dropped after the scope is over. Also you cannt apply Drop table @t statement which is invalidMadhivananFailing to plan is Planning to fail |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-05-18 : 07:38:11
|
You should have a Primary key on your @TableVar or #TempTable - IME it can make a big difference to performance, particularly if you have 1,000's of rowsKristen |
|
|
|
|
|