DBMS-Microsoft SQL Server Questions and Answers
Practice ModeShowing 10 of 49 questions
Q11
Which clause is used to filter records in a SQL query?
Answer: Option B
Explanation: WHERE clause filters records based on specified conditions.
Q12
Which SQL keyword is used to sort the result-set?
Answer: Option B
Explanation: ORDER BY sorts the result set in ascending or descending order.
Q13
Which of the following is used to combine rows from two or more tables?
Answer: Option C
Explanation: JOIN combines rows from multiple tables based on related columns.
Q14
Which SQL constraint ensures that a column cannot have NULL values?
Answer: Option C
Explanation: NOT NULL constraint prevents NULL values in a column.
Q15
Which function returns the number of rows in a table?
Answer: Option C
Explanation: COUNT() function returns the number of rows matching specified criteria.
Q16
Which statement is used to update existing records in a table?
Answer: Option C
Explanation: UPDATE statement modifies existing records in a table.
Q17
Which statement is used to delete records from a table?
Answer: Option B
Explanation: DELETE statement removes records from a table.
Q18
Which keyword is used to create a new table in SQL?
Answer: Option B
Explanation: CREATE TABLE statement creates a new table in the database.
Q19
Which data type would you use for storing monetary values?
Answer: Option D
Explanation: MONEY or DECIMAL data types are suitable for monetary values due to precision.
Q20
Which keyword is used to add new records to a table?
Answer: Option B
Explanation: INSERT INTO adds new records to a table.