n********6 发帖数: 1511 | 1 Question1: What are the two ways to create the temptable? Which is the best
practice?
My answer:
Option1:
CREATE TABLE ##TEMPTABLE
...
INSERT INTO ##TEMPTABLE
SELECT ...
FROM ...
Option2:
SELECT ...
INTO ##TEMPTABLE
FROM ...
WHERE ...
I do not know which is the best practice. I think both can check the ##
temptable in tempdb first for validation, and both can create index after
data insert. |
j*****n 发帖数: 1781 | 2 Related questions:
The diff b/w local and global temp table? Accessibility? Life?
Where is the temp table stored?
What is table variable? Where is it stored?
What diff b/w temp table and table variable? which one is better? |
B*****g 发帖数: 34098 | 3 全都忘了。我哭
【在 j*****n 的大作中提到】 : Related questions: : The diff b/w local and global temp table? Accessibility? Life? : Where is the temp table stored? : What is table variable? Where is it stored? : What diff b/w temp table and table variable? which one is better?
|
j*****n 发帖数: 1781 | 4 pat pat
【在 B*****g 的大作中提到】 : 全都忘了。我哭
|