MCQ King
25 – Temporary Tables MCQ
Best of luck!
1 / 35
1. What is a Temporary Table in SQL Server?
2 / 35
2. Which prefix is commonly used to name local temporary tables in SQL Server?
3 / 35
3. What is the scope of a local temporary table in SQL Server?
4 / 35
4. Which type of temporary table is created using a double hash prefix (##) in SQL Server?
5 / 35
5. When is data stored in a local temporary table automatically deleted in SQL Server?
6 / 35
6. Which statement is used to create a temporary table in SQL Server?
7 / 35
7. Which of the following is true about the column data types of temporary tables in SQL Server?
8 / 35
8. What is the naming convention for global temporary tables in SQL Server?
9 / 35
9. What happens when two sessions attempt to create a global temporary table with the same name simultaneously in SQL Server?
10 / 35
10. How can you explicitly drop a temporary table in SQL Server?
11 / 35
11. Which statement is used to insert data into a temporary table in SQL Server?
12 / 35
12. What is the purpose of a global temporary table in SQL Server?
13 / 35
13. Which of the following is true about the lifespan of a system temporary table in SQL Server?
14 / 35
14. Can you create indexes on temporary tables in SQL Server?
15 / 35
15. Which type of temporary table is visible to all sessions and persists until the SQL Server instance restarts?
16 / 35
16. In SQL Server, what is the primary use of temporary tables?
17 / 35
17. Can you create triggers on temporary tables in SQL Server?
18 / 35
18. What is the maximum number of local temporary tables that can be created within a single session in SQL Server?
19 / 35
19. Which statement is used to rename a temporary table in SQL Server?
20 / 35
20. In SQL Server, can you create foreign key constraints on temporary tables?
21 / 35
21. Which of the following statements is true about the schema of a temporary table in SQL Server?
22 / 35
22. What is the primary difference between local and global temporary tables in SQL Server?
23 / 35
23. When you create a temporary table with the same name as an existing permanent table, which table is used in SQL Server?
24 / 35
24. In SQL Server, what happens to the data in a local temporary table when the session that created it disconnects unexpectedly (e.g., due to a client crash)?
25 / 35
25. Which statement is used to check if a temporary table exists in SQL Server?
26 / 35
26. What is the scope of a global temporary table in SQL Server?
27 / 35
27. Which system database is primarily responsible for managing temporary tables in SQL Server?
28 / 35
28. In SQL Server, what is the purpose of the COLLATE clause when creating a temporary table?
29 / 35
29. Which of the following is NOT a valid name for a temporary table in SQL Server?
30 / 35
30. When is the schema of a temporary table resolved in SQL Server?
31 / 35
31. In SQL Server, can you create a temporary table within a user-defined function (UDF)?
32 / 35
32. What is the maximum number of global temporary tables with the same name that can be created within a single SQL Server instance?
33 / 35
33. Which statement is used to insert data into a temporary table that has an identity column in SQL Server?
34 / 35
34. In SQL Server, when is the data in a global temporary table automatically deleted?
35 / 35
35. Which system database is primarily responsible for managing temporary tables in SQL Server?
Your score is
Restart quiz