T-SQL 101: #104 Using an INNER JOIN
January 31, 2025This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.
Section: Security
Level: Medium
Question:
User1 has CONNECT permission to a SQL Server and is a member of the db_datawriter role in the database Database1.
User2 has CONNECT permission to the same SQL Server and is a member of the db_datareader role in the database Database1.
User3 has CONNECT permission to the same SQL Server and is not a member of any roles in Database1.
Which of these users can create a temporary table when connected to the SQL Server and Database1?
Answer:
All three users can create temporary tables.
Users only need permission to connect to the server to be able to create temporary databases. Role membership in the database is not relevant.
The post SQL Interview: #15: Permission to create a temporary table appeared first on The Bit Bucket.