View or Temporary Table - which to use in MS SQL Server?

后端 未结 5 1280
礼貌的吻别
礼貌的吻别 2020-12-08 01:55

I have a problem to decide whether to use a view or a temp table.

I have a stored procedure that i call from program. In that SP i store the result of a long query i

5条回答
  •  情歌与酒
    2020-12-08 02:40

    I'd like to also mention that for temporary table,

    You cannot refer to a TEMPORARY table more than once in the same query.

    This make temp table inconvenient for the cases where you want to use self join on it.

提交回复
热议问题