All fields

“Dynamic SQL” in Information Technology

26 questions across 1 technology.

Information Technology

26 questions in 1 technology

#QuestionTechnologyTopicLevel
1What is SQL injection, and how does it relate to writing dynamic SQL unsafely? SQL Server › Dynamic SQLSQL ServerDynamic SQLBeginner
2How do you safely use sp_executesql to execute dynamic SQL with parameters, avoiding the risks of simple string concatenation? SQL Server › Dynamic SQLSQL ServerDynamic SQLIntermediate
3How would you build a dynamic SQL query where the table or column names themselves need to change based on input, since parameters cannot be used for object names? SQL Server › Dynamic SQLSQL ServerDynamic SQLIntermediate
4What are the performance tradeoffs of using dynamic SQL compared to static, precompiled SQL statements? SQL Server › Dynamic SQLSQL ServerDynamic SQLAdvanced
5What is dynamic SQL, and why would you need to build and execute a SQL statement as a string rather than writing it directly? SQL Server › Dynamic SQLSQL ServerDynamic SQLBeginner
6How do you debug a dynamic SQL statement when it fails or does not produce the expected results? SQL Server › Dynamic SQLSQL ServerDynamic SQLIntermediate
7How would you build a dynamic SQL statement inside a stored procedure that constructs a flexible search query based on several optional filter parameters? SQL Server › Dynamic SQLSQL ServerDynamic SQLAdvanced
8What is dynamic data masking in SQL Server, and what problem does it solve? SQL Server › Dynamic Data MaskingSQL ServerDynamic Data MaskingBeginner
9What built-in masking functions are available in SQL Server for dynamic data masking? SQL Server › Dynamic Data MaskingSQL ServerDynamic Data MaskingBeginner
10What is the difference between a SQL Server login and a database user? SQL Server › SQL Server Security & PermissionsSQL ServerSQL Server Security & PermissionsBeginner
11How do you declare and use a variable in T-SQL? SQL Server › T-SQL Fundamentals & SyntaxSQL ServerT-SQL Fundamentals & SyntaxBeginner
12How do you grant a specific user or role permission to see the real, unmasked data despite dynamic data masking being applied? SQL Server › Dynamic Data MaskingSQL ServerDynamic Data MaskingIntermediate
13Does dynamic data masking prevent a determined user from working around it to see the real underlying values? SQL Server › Dynamic Data MaskingSQL ServerDynamic Data MaskingIntermediate
14How do you remove dynamic data masking from a column once it is no longer needed? SQL Server › Dynamic Data MaskingSQL ServerDynamic Data MaskingIntermediate
15What is the principle of least privilege, and how should it guide how you grant permissions in SQL Server? SQL Server › SQL Server Security & PermissionsSQL ServerSQL Server Security & PermissionsIntermediate
16How would you apply dynamic data masking to an existing table with sensitive columns as part of a broader compliance initiative, such as meeting data privacy regulations? SQL Server › Dynamic Data MaskingSQL ServerDynamic Data MaskingAdvanced
17How does dynamic data masking behave differently when a masked column is used in a JOIN, WHERE clause, or exported through an application, compared to a simple SELECT query? SQL Server › Dynamic Data MaskingSQL ServerDynamic Data MaskingAdvanced
18How would you design a comprehensive security auditing strategy to track who accessed or modified sensitive data in a SQL Server database? SQL Server › SQL Server Security & PermissionsSQL ServerSQL Server Security & PermissionsAdvanced
19What are the different cursor types available in SQL Server, such as static, dynamic, and forward only, and how do they differ? SQL Server › CursorsSQL ServerCursorsIntermediate
20What is a stored procedure in SQL Server, and what are the main benefits of using one? SQL Server › Stored Procedures & FunctionsSQL ServerStored Procedures & FunctionsBeginner
21What is Transparent Data Encryption in SQL Server, and what specifically does it protect? SQL Server › Transparent Data EncryptionSQL ServerTransparent Data EncryptionBeginner
22What is the difference between what Transparent Data Encryption protects against compared to Dynamic Data Masking? SQL Server › Transparent Data EncryptionSQL ServerTransparent Data EncryptionBeginner
23How does the syntax of the PIVOT operator work, and what are its main components? SQL Server › Pivoting & Unpivoting DataSQL ServerPivoting & Unpivoting DataIntermediate
24How would you handle a pivoting scenario where the set of columns needed is not known ahead of time and could change over time? SQL Server › Pivoting & Unpivoting DataSQL ServerPivoting & Unpivoting DataIntermediate
25What is the difference between using EXEC and calling a stored procedure through parameterized application code, and why does this distinction matter for security? SQL Server › Stored Procedures & FunctionsSQL ServerStored Procedures & FunctionsIntermediate
26How do you use a view to help enforce a basic level of security by limiting which columns or rows different groups of users can see? SQL Server › ViewsSQL ServerViewsIntermediate