Select a.field1, b.field2 ... into #temp From table1 a, table2 b (where a.id=b.id) 放在存储过程里可以,放在Query里也可以,你自己看自己喜欢那一种;
你如果要直接在Query-->DBGrid中看到它的结果就写成:Select a.field1, b.field2 ... From table1 a, table2 b (where a.id=b.id)如果你说的临时表是一个实际存在(已建结构)的表那就用:Insert into temp Select a.field1, b.field2 ... From table1 a, table2 b (where a.id=b.id)如果你是要在非程序方式看到它可以在SQL的 Analyzer中写成Select a.field1, b.field2 ... into #temp From table1 a, table2 b (where a.id=b.id)并用 Select * From #Temp 来查看结果和做其它操作
From table1 a, table2 b
(where a.id=b.id)
放在存储过程里可以,放在Query里也可以,你自己看自己喜欢那一种;
From table1 a, table2 b
(where a.id=b.id)如果你说的临时表是一个实际存在(已建结构)的表那就用:Insert into temp
Select a.field1, b.field2 ...
From table1 a, table2 b
(where a.id=b.id)如果你是要在非程序方式看到它可以在SQL的 Analyzer中写成Select a.field1, b.field2 ... into #temp
From table1 a, table2 b
(where a.id=b.id)并用 Select * From #Temp 来查看结果和做其它操作
只对第二种有效。