Select a.field1, b.field2 ... into #temp
From table1 a, table2 b
(where a.id=b.id)

解决方案 »

  1.   

    Select a.field1, b.field2 ... into #temp
    From table1 a, table2 b
    (where a.id=b.id)
    放在存储过程里可以,放在Query里也可以,你自己看自己喜欢那一种;
      

  2.   

    你如果要直接在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 来查看结果和做其它操作
      

  3.   

    但是Query所建的是只读型临时表呀
      

  4.   

    真拿你没办法把TQuery的CacheUpdates设为True,再加TUpdateSQL就不只读了。
    只对第二种有效。