DBMS-Microsoft SQL Server Questions and Answers

Practice Mode
Showing 10 of 49 questions
Q31
Which clause is used to filter records in a SQL query?
  • A FILTER
  • B WHERE
  • C CONDITION
  • D HAVING
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?
  • A SORT
  • B ORDER BY
  • C ARRANGE
  • D SORT BY
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?
  • A TOTAL()
  • B SUM()
  • C COUNT()
  • D NUMBER()
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?
  • A INNER JOIN
  • B LEFT JOIN
  • C RIGHT JOIN
  • D FULL OUTER JOIN
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?
  • A NOT NULL
  • B CHECK
  • C UNIQUE
  • D DEFAULT
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?
  • A MODIFY
  • B CHANGE
  • C UPDATE
  • D ALTER
Answer: Option C
Explanation: UPDATE statement modifies existing records in a table.
Q37
Which SQL command is used to delete a table?
  • A DELETE
  • B REMOVE
  • C DROP TABLE
  • D TRUNCATE
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?
  • A INT
  • B VARCHAR
  • C VARBINARY(MAX)
  • D DECIMAL
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?
  • A NEW TABLE
  • B CREATE TABLE
  • C ADD TABLE
  • D BUILD 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?
  • A MATCH
  • B LIKE
  • C SIMILAR
  • D PATTERN
Answer: Option B
Explanation: LIKE operator is used in WHERE clause to search for specified patterns.
Database
Back to Database
Questions and Answers for Competitive Exams Various Entrance Test