DBMS-Microsoft SQL Server Questions and Answers
Practice ModeShowing 10 of 49 questions
Q31
Which clause is used to filter records in a SQL query?
Answer: Option B
Explanation: WHERE clause specifies conditions that must be met for rows to be returned.
Q32
Which SQL keyword is used to sort the result-set?
Answer: Option B
Explanation: ORDER BY clause sorts the result set in ascending or descending order.
Q33
Which function returns the number of rows in a table?
Answer: Option C
Explanation: COUNT() function returns the number of rows that match specified criteria.
Q34
Which JOIN returns all records when there is a match in either left or right table?
Answer: Option D
Explanation: FULL OUTER JOIN returns all records when there is a match in either table.
Q35
Which SQL constraint ensures that a column cannot have NULL values?
Answer: Option A
Explanation: NOT NULL constraint prevents NULL values from being inserted into a column.
Q36
Which statement is used to modify existing records in a table?
Answer: Option C
Explanation: UPDATE statement modifies existing records in a table.
Q37
Which SQL command is used to delete a table?
Answer: Option C
Explanation: DROP TABLE command removes a table and all its data from the database.
Q38
Which data type can store large binary objects?
Answer: Option C
Explanation: VARBINARY(MAX) can store large binary data like images or files.
Q39
Which statement is used to create a new table?
Answer: Option B
Explanation: CREATE TABLE statement creates a new table in the database.
Q40
Which operator is used to search for a specified pattern in a column?
Answer: Option B
Explanation: LIKE operator is used in WHERE clause to search for specified patterns.