DBMS-Microsoft SQL Server Questions and Answers

Practice Mode
Showing 10 of 49 questions
Q11
Which clause is used to filter records in a SQL query?
  • A FILTER
  • B WHERE
  • C HAVING
  • D CHECK
Answer: Option B
Explanation: WHERE clause filters records based on specified conditions.
Q12
Which SQL keyword is used to sort the result-set?
  • A SORT
  • B ORDER BY
  • C ARRANGE
  • D GROUP BY
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?
  • A MERGE
  • B UNION
  • C JOIN
  • D COMBINE
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?
  • A REQUIRED
  • B MANDATORY
  • C NOT NULL
  • D MUST HAVE
Answer: Option C
Explanation: NOT NULL constraint prevents NULL values in a column.
Q15
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 matching specified criteria.
Q16
Which statement is used to update 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.
Q17
Which statement is used to delete records from a table?
  • A REMOVE
  • B DELETE
  • C ERASE
  • D CLEAR
Answer: Option B
Explanation: DELETE statement removes records from a table.
Q18
Which keyword is used to create a new table in SQL?
  • A ADD TABLE
  • B CREATE TABLE
  • C NEW TABLE
  • D MAKE TABLE
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?
  • A INT
  • B FLOAT
  • C VARCHAR
  • D MONEY
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?
  • A ADD RECORD
  • B INSERT INTO
  • C NEW ROW
  • D CREATE ROW
Answer: Option B
Explanation: INSERT INTO adds new records to a table.
Database
Back to Database
Questions and Answers for Competitive Exams Various Entrance Test