Q1
True / FalseThe MERGE statement in SQL Server supports UPSERT operations by combining INSERT and UPDATE actions.
The MERGE statement in SQL Server allows for both INSERT and UPDATE operations in a single statement, making it suitable for UPSERT tasks.
Q2
True / FalseThe SQL Server MERGE statement can only perform UPSERT operations if the source and target tables have the same schema.
The source and target tables do not need to have identical schemas. They need compatible columns for matching and operations, but not an exact schema match.
Q3
True / FalseIn SQL Server, the MERGE statement can be used to perform UPSERT operations with conditional logic based on matching criteria.
The MERGE statement uses the ON clause to specify matching conditions and can perform UPSERT operations based on this conditional logic.
Q4
True / FalseThe MERGE statement in SQL Server requires that the source and target tables are located in the same database.
The MERGE statement can handle operations between tables in different databases as long as they are accessible from the current database context.
Q5
True / FalseThe WHEN NOT MATCHED clause in the MERGE statement specifies actions to be taken for rows in the source table that do not match any rows in the target table.
The WHEN NOT MATCHED clause is used to specify actions for rows that exist in the source table but not in the target table, such as INSERT operations.
Q6
True / FalseThe SQL Server MERGE statement can handle data from multiple source tables in a single operation.
The MERGE statement operates on a single source table and a single target table at a time.
Q7
True / FalseThe SQL Server MERGE statement can automatically handle conflicts that arise during UPSERT operations.
The MERGE statement provides conflict handling mechanisms but requires explicit logic to manage conflicts and ensure data integrity.
Q8
True / FalseWhen using the MERGE statement, SQL Server ensures that the UPSERT operations are performed within a single transaction by default.
The MERGE statement operates within a transaction context, but explicit transaction handling may be required for complex scenarios.
Q9
True / FalseIn SQL Server, the MERGE statement can be used to synchronize data between tables with different structures.
The MERGE statement requires that the columns used for matching and actions be compatible, but it does not require the entire table schema to be identical.
Q10
True / FalseThe MERGE statement in SQL Server can only be used with tables and not with indexed views or other database objects.
The MERGE statement can operate on tables, indexed views, and other database objects as long as they meet the required conditions.
Q11
True / FalseThe MERGE statement in SQL Server is not supported in the context of triggers.
The MERGE statement can be used in stored procedures and functions but is not directly supported in triggers.
Q12
True / FalseSQL Server's MERGE statement supports both single-row and multi-row operations.
The MERGE statement is capable of handling both single-row and multi-row operations depending on the matching criteria and source data.
Q13
True / FalseUsing the MERGE statement, SQL Server can perform UPSERT operations across different databases without any additional configuration.
The MERGE statement can operate across databases but may require additional configurations for cross-database transactions.
Q14
True / FalseThe MERGE statement in SQL Server automatically creates indexes on the source and target tables to optimize UPSERT operations.
The MERGE statement does not automatically create indexes. Indexes must be managed manually to optimize performance.
Q15
True / FalseIn SQL Server, the MERGE statement is more efficient than separate INSERT and UPDATE statements in all scenarios.
The MERGE statement may be more efficient in certain scenarios, but separate INSERT and UPDATE statements can sometimes be more appropriate depending on the use case and data volume.