SQL Server: collect values in an aggregation temporarily and re-use in the same query

后端 未结 3 502
终归单人心
终归单人心 2021-01-02 16:37

How do I accumulate values in T-SQL? AFAIK there is no ARRAY type.
I want to re-use the values in the same query like demonstrated in this PostgreSQL example using array

3条回答
  •  迷失自我
    2021-01-02 17:19

    Not sure if this helps, but you can always...

    select * into #MyTempTable from SomeTable
    

提交回复
热议问题