由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - 补贴上次面试题
相关主题
这种insert怎么做高手请指点: How to query specific data in all columns efficiently
请教sql server temptable # 和 ##真服了老印
SQL query 一问[合集] 这种insert怎么做
请教oracle select top 10 from ... order by descDB2面试题求教,谢谢!
如何在数据库中进行复杂查询, 但不把中间结果放到程序内存小女子,请求帮助SAS 概率面试题
Late afternoon 腦不好使请教:SQL面试题。
怎么求和sql面试题1
怎么reference temp table的columnsql面试题2
相关话题的讨论汇总
话题: temptable话题: table话题: create话题: what话题: where
进入Database版参与讨论
1 (共1页)
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 的大作中提到】
: 全都忘了。我哭
1 (共1页)
进入Database版参与讨论
相关主题
sql面试题2如何在数据库中进行复杂查询, 但不把中间结果放到程序内存
sql server 面试题 (1)Late afternoon 腦不好使
sql server 面试题 (3)怎么求和
sql server 面试题 (4)怎么reference temp table的column
这种insert怎么做高手请指点: How to query specific data in all columns efficiently
请教sql server temptable # 和 ##真服了老印
SQL query 一问[合集] 这种insert怎么做
请教oracle select top 10 from ... order by descDB2面试题求教,谢谢!
相关话题的讨论汇总
话题: temptable话题: table话题: create话题: what话题: where