DRAG DROP
You conned to a Microsoft SQL Server database
You need to create a custom SQL query that retrieves rows from a table named Students Only students m the city of Berlin must be returned
How should you complete the query? (Drag the appropriate Options to the Answer Area and drop into the correct locations.)
Answer:
Explanation:
Select
Where
The correct way to complete the query is:
SELECT * FROM [dbo] . [Students]
WHERE [Students].[City] = ‘Berlin’
The SELECT statement is used to retrieve data from a table or a view. The * symbol means that all columns will be returned. The FROM clause specifies the table or view name and the schema name. The WHERE clause is used to filter the data based on a condition. The condition is [Students].[City] = ‘Berlin’, which means that only rows where the City column of the Students table is equal to ‘Berlin’ will be returned.
The other options are not relevant for this query. CAST is a function that converts a value from one data type to another. JOIN is a clause that combines data from two or more tables based on a common field. ON is a keyword that specifies the join condition. UNION is a set operation that combines the results of two or more queries into one result set.
Reference:
https://docs.microsoft.com/en-us/sql/t-sql/queries/select-transact-sql?view=sql-server-ver15
https://docs.microsoft.com/en-us/sql/t-sql/queries/where-transact-sql?view=sql-server-ver15
https://docs.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql?view=sql-server-ver15
https://docs.microsoft.com/en-us/sql/t-sql/queries/from-transact-sql?view=sql-server-ver15#join
https://docs.microsoft.com/en-us/sql/t-sql/language-elements/set-operators-union-transact-sql?view=sql-server-ver15
Latest TDA-C01 Dumps Valid Version with 55 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund