Sql Server MCQ

Sql Server MCQ

  • Admin
  • 05th May, 2021

Sql Server MCQ Quiz

Following are mostly asked Sql server MCQ test that are designed for professionals like you to crack you interviews. You can take this Sql server online test before appearing to you real interview. This Sql server quiz there are around 30+ multiple choice questions on Sql server with four options.

1) Point out the correct statement:

  • A. A stored procedure is a group of Transact-SQL statements pre compiled into a single execution plan
  • B. Stored procedures cannot improve performance
  • C. Conditional logic applied to the results of the first SQL statements determines which subsequent SQL statements are executed
  • D. All of these

2) ........takes no parameters and returns all kinds of interesting information:

  • A. sp_status
  • B. sp_monitor
  • C. sp_on
  • D. None of the above

3) Which of the following has support for transaction?

  • A. sp_status
  • B. sp_monitor
  • C. sp_bindsession
  • D. none

4) Point out the wrong statement:

  • A. Support for transactions is one of the most important reasons to use database engines such as SQL Server
  • B. BASE support
  • C. ACID support
  • D. None of the above

5) ........create the removable database:

  • A. sp_certify
  • B. sp_removable
  • C. sp_certify_removable
  • D. None
Download Free : Sql Server MCQ PDF

6) Which of the following stored procedure is used for error messages?

  • A. sp_altermessage
  • B. sp_addmessage
  • C. sp_dropmessage
  • D. All of these

7) ........sets procedure options in SQL Server:

  • A. sp_altermessage
  • B. sp_executesql
  • C. sp_dropmessage
  • D. sp_procoption

8) Stored procedure used to remember the exact number of bytes is......

  • A. sp_info
  • B. sp_datatype_info
  • C. sp_datatype
  • D. All of the above

9) What does DML stand for?

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

10) 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 LIKE ‘%a’
  • B. SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
  • C. SELECT * FROM Persons WHERE FirstName=’a’
  • D. SELECT * FROM Persons WHERE FirstName=’%a%’

11) What does the ALTER TABLE clause do?

  • A. The SQL ALTER TABLE clause is used to insert data into database table
  • B. The SQL ALTER TABLE clause is used to delete a database table
  • C. The SQL ALTER TABLE clause modifies a table definition by altering, adding, or deleting table columns and/or constraints
  • D. THE SQL ALTER TABLE deletes data from database table

12) What type of join is needed when you wish to include rows that do not have matching values?

  • A. Outer join
  • B. Equi-join
  • C. Natural join
  • D. none

13) Which of the following is one of the basic approaches for joining tables?

  • A. Natural join
  • B. Subqueries
  • C. Union Join
  • D. All of the above

14) How many tables may be included with a join?

  • A. one
  • B. two
  • C. three
  • D. All of these

15) Which is not a type of join in T-SQL?

  • A. Equi-join
  • B. Cartesian join
  • C. Outer join
  • D. Natural join

16) Aggregate functions are functions that take a .......... as input and return a single value:

  • A. Double value
  • B. Collection of values
  • C. Single value
  • D. All of the above

17) SQL applies predicates in the ......... clause after groups have been formed, so aggregate functions may be used:

  • A. With
  • B. Having
  • C. Where
  • D. Group by

18) If we do want to eliminate duplicates, we use the keyword............in the aggregate expression:

  • A. Count
  • B. Primary key
  • C. Distinct
  • D. Avg

19) Which of the following command is used to get child items in powershell?

  • A. Get-ChildItem
  • B. Get-Child
  • C. Set-Alias
  • D. Get-Command

20) ......... convert object properties into CSV objects:

  • A. Convert-CSV
  • B. ConvertFromCSV
  • C. ConvertFrom-CSV
  • D. none

21) Which of the following is not a ranking function?

  • B. RANK
  • C. NTILE
  • D. All of the above

22) Which of the clause is not mandatory?

  • A. ORDER BY clause
  • B. PARTITION BY clause
  • C. OVER clause
  • D. None

23) SQL injection is an attack in which .......... code is inserted into strings that are later passed to an instance of SQL Server:

  • A. redundant
  • B. clean
  • C. malicious
  • D. non malicious

24) Any user-controlled parameter that gets processed by the application includes vulnerabilities like .....

  • A. Browser-related information
  • B. Host-related information
  • C. Application parameters included as part of the body of a POST request
  • D. All of the above

25) Which of the stored procedure is used to test the SQL injection attack?

  • A. xp_reg
  • B. xp_write
  • C. xp_regwrite
  • D. none

26) Which of the following operation cannot be performed in bulk?

  • A. Import
  • B. Copy
  • C. Insert
  • D. All of the above

27) Under the ....... recovery model, all bulk operations are fully logged:

  • A. Full
  • B. Partial
  • C. Simple
  • D. None

28) Which of the following is a bulk import operation?

  • B. bcp
  • D. All of these

29) Which of the following utility supports bulk exports and bulk imports data and generates format files?

  • A. bcp utility
  • B. icp utility
  • C. dcp utility
  • D. none

30) Service broker was added to SQL Server:

  • A. 2005
  • B. 2007
  • C. 2009
  • D. 2011

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

Azure MCQ
Django MCQ