SQL Server MCQs with answers Page - 17

Here, you will find a collection of MCQ questions on SQL Server. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. With SQL, how can you return the number of not null records in the “Persons” table?

  • (A) SELECT COUNT(*) FROM Persons
  • (B) SELECT COLUMNS(*) FROM Persons
  • (C) SELECT COLUMNS() FROM Persons
  • (D) SELECT COUNT() FROM Persons

A

Admin • 833.24K Points
Coach

Q. With SQL, how can you return all the records from a table named “Persons” sorted descending by “FirstName”?

  • (A) SELECT * FROM Persons ORDER BY FirstName DESC
  • (B) SELECT * FROM Persons SORT ‘FirstName’ DESC
  • (C) SELECT * FROM Persons ORDER FirstName DESC
  • (D) SELECT * FROM Persons SORT BY ‘FirstName’ DESC

A

Admin • 833.24K Points
Coach

Q. With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a”?

  • (A) SELECT * FROM Persons WHERE FirstName=’%a%’
  • (B) SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
  • (C) SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
  • (D) SELECT * FROM Persons WHERE FirstName=’a’

A

Admin • 833.24K Points
Coach

Q. What does DML stand for?

  • (A) Data Manipulation language
  • (B) Data Mode Lane
  • (C) Data Model Language
  • (D) Different Mode Level

A

Admin • 833.24K Points
Coach

Q. What is the purpose of the SQL AS clause?

  • (A) The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column
  • (B) The AS clause defines a search condition
  • (C) The AS clause is used with the JOIN clause only
  • (D) All of the mentioned

A

Admin • 833.24K Points
Coach

Q. If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default ______________

  • (A) ASC
  • (B) DESC
  • (C) There is no default value
  • (D) None of the mentioned

A

Admin • 833.24K Points
Coach

Q. ________________ is not a category of SQL command.

  • (A) DDL
  • (B) DCL
  • (C) SCL
  • (D) TCL

A

Admin • 833.24K Points
Coach

Q. Which of the following are TCL commands?

  • (A) ROLLBACK and SAVEPOINT
  • (B) GRANT and REVOKE
  • (C) SELECT and INSERT
  • (D) UPDATE and TRUNCATE

A

Admin • 833.24K Points
Coach

Q. Which of the following is not a DDL command?

  • (A) ALTER
  • (B) UPDATE
  • (C) TRUNCATE
  • (D) None of the Mentioned

A

Admin • 833.24K Points
Coach

Q. ___________removes all rows from a table without logging the individual row deletions.

  • (A) TRUNCATE
  • (B) DROP
  • (C) REMOVE
  • (D) DELETE

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ