Temporary Table Usage in SQL Server

后端 未结 6 1058
礼貌的吻别
礼貌的吻别 2021-02-10 05:20

This is a bit of an open question but I would really like to hear people opinions.

I rarely make use of explicitly declared temporary tables (either table variables or r

6条回答
  •  轮回少年
    2021-02-10 05:55

    It really depends on what you are doing. I generally try to avoid them, but sometimes you need to do something complicated that takes multiple steps. Generally this is way beyond the simple select from table stuff. Like anything else it's a tool that you have to know when to use.

    I would agree with you that I normally let the db handle stuff behind the scenes, but there are times when it's optimization is off and you have to go in and do it by hand.

提交回复
热议问题