Sql Server MCQ

Sql Server MCQ

  • Sharad Jaiswal
  • 31st Jul, 2021

We have listed here the best SQL Server Mcq Questions for your basic knowledge of SQL Server. This SQL Server Mcq Test contains 25 multiple Choice Questions. You have to select the right answer to every question.

Sql Server Multiple Choice Questions

1) Which of the following command makes the updates performed by the transaction permanent in database

  • A. COMMIT
  • B.ROLLBACK
  • C.TRUNCATE
  • D.DELETE

2) Which command is used to change a table storage characteristics.

  • A. ALTER TABLE
  • B.MODIFY TABLE
  • C.CHANGE TABLE
  • D.DELETE TABLE

3) Purpose of foreign key constraint are:

  • A. FOREIGN KEY constraints identify and enforce the relationships between tables
  • B.FOREIGN KEY in one table points to a candidate key in another table
  • C.You cannot insert a row with a foreign key.
  • D.None of the above

4) How many Primary key a table can max have?

  • A. Only 1
  • B.Only 2
  • C.More Than
  • D.None of the above

5) Which of the following is true for a primary key?

  • A. It can take null values
  • B.It can’t take null values
  • C.It can take a value more than once
  • D.None of the above

6) Which of the following is illegal?

  • A. SELECT SYSDATE - SYSDATE FROM DUAL;
  • B.SELECT SYSDATE - (SYSDATE - 2) FROM DUAL;
  • C.SELECT SYSDATE - (SYSDATE + 2) FROM DUAL;
  • D.None of the above

7) statement makes the updates performed by the transaction permanent

  • A. Finish work
  • B.Finalize work
  • C.Commit work
  • D.None of the above

8) Update sql clause can be

  • A. Update Only 1 row at a time
  • B.Delete only 1 row at a time
  • C.Update more than 1 row at a time
  • D.Delete more than 1 row at a time

9) Which operator performs pattern matching are:

  • A. LIKE
  • B.EXISTS
  • C.BETWEEN
  • D.None of the above

10) Which Of The SQL Statements Is Correct?

  • A. SELECT Username, Password FROM Users
  • B.SELECT Username AND Password FROM Users
  • C.SELECT Username, Password WHERE Username = 'user1'
  • D.All of the above

11) How can a SQL developer add a key on a table?

  • A. SQL server Properties window
  • B.Alter table command
  • C.Creating a table
  • D.All of the above

12) AFTER trigger in SQL Server can be applied to -

  • A. Views
  • B.Table
  • C.Function
  • D.Table and Views

13) ________takes no parameters and returns all kinds of interesting information.

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

14) _______ sets procedure options in SQL Server.

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

15) The command used to delete a particular column in a relation is_______

  • A. ALTER , DROP
  • B.UPDATE TABLE
  • C.TRUNCATE COLUMN
  • D.DELETE COLUMN

16) Which statement is used to define a cursor?

  • A. OPEN
  • B.FETCH
  • C.DECLARE CURSOR
  • D.Both A & B

17) Column with an optimized storage for null values is known as________

  • A. sparse
  • B.dense
  • C.spatial
  • D.optimum

18) Dynamic Page Repair is a type of database mirroring

  • A. True
  • B.False

19) The identifers in SQL can have a character range from?

  • A. 1 to 64
  • B.1 to 100
  • C.1 to 128
  • D.1 to 132

20) What is the full form of DDL?

  • A. Dynamic Data Language
  • B.Data Definition Language
  • C.Detailed Data Language
  • D.Data Derivation Language

21) SQL WHERE clause:

  • A. limits the column data that are returned.
  • B.limits the row data are returned.
  • C.define the data structures
  • D.None of the above

22) Which of the following is valid SQL for an Index?

  • A. ADD INDEX ID;
  • B.CREATE INDEX ID;
  • C.CHANGE INDEX ID;
  • D.REMOVE INDEX ID;

23) Composite key is made up of_______

  • A. One foreign key
  • B.One super key
  • C.Two or more columns
  • D.One column

24) _____index is created based on only one table column.

  • A. Implicit
  • B.single column
  • C.Unique column
  • D.Composite

25) ______ have a structure separate from the data rows?

  • A. Clustered
  • B.Non Clustered
  • C.Covered
  • D.B-Tree

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Aug
Powerpoint MCQ