How to GRANT permissions to a SQL role to create and manage temp tables

后端 未结 3 490
猫巷女王i
猫巷女王i 2021-01-20 03:43

I\'d like to grant permissions to a SQL role to create a temp table #foo and grant permissions to do anything with that table (SELECT, INSERT and DELETE). How is it possible

3条回答
  •  天涯浪人
    2021-01-20 04:50

    I am not sure about Azure, but ...

    If you explicitly create a table in the tempdb, it persists across sessions, but will be cleaned out upon server reboot.

    create table tempdb..authors (au_id char(11))
    

    If you create a ##TempTable it is globally visible, but it also ends with the creator's session.

提交回复
热议问题