31st
Jan
SQL Server MCQ

SQL Server MCQ

  • Admin
  • 31st Jan, 2023
  • 379 Followers

Take SQL Server MCQ Test to test your knowledge 

Test and improve your knowledge of the fundamentals of SQL Server with these multiple-choice questions. these top SQL Server MCQs will help you prepare for certification exams, keep up with the latest trends, and learn the basics quickly and easily.

Also, Read Best SQL Server Interview Questions.

SQL Server MCQ Questions

1) Which Is The Subset Of SQL Commands Used To Manipulate Oracle Database Structures, Including Tables?

  • A. Data Manipulation Language(DML)
  • B.Data Definition Language(DDL)
  • C.Both Of Above
  • D.None

2) Which Operator Performs Pattern Matching?

  • A. LIKE Operator
  • B.BETWEEN Operator
  • C.EXISTS Operator
  • D.None Of These

3) In SQL, Which Command(s) Is(are) Used To Change A Table's Storage Characteristics?

  • A. MODIFY TABLE
  • B.CHANGE TABLE
  • C.ALTER TABLE
  • D.All Of The Above

4) In SQL, Which Command Is Used To SELECT Only One Copy Of Each Set Of Duplicable Rows

  • A. SELECT UNIQUE
  • B.SELECT DISTINCT
  • C.SELECT DIFFERENT
  • D.All Of The Above

5) Which Of The SQL Statements Is Correct?

  • A. SELECT Username, Password WHERE Username = 'user1'
  • B.SELECT Username AND Password FROM Users
  • C.SELECT Username, Password FROM Users
  • D.None Of These
Download Free : SQL Server MCQ PDF

6) Which SQL Keyword Is Used To Retrieve Only Unique Values?

  • A. DISTINCT
  • B.DISTINCTIVE
  • C.UNIQUE
  • D.DIFFERENT

7) Which Of The Following Is A SQL Aggregate Function?

  • A. AVG
  • B.LEFT
  • C.JOIN
  • D.LEN

8) The SQL Statement
SELECT SUBSTR('123456789', INSTR('abcabcabc', 'b'), 4) FROM DUAL;

  • A. 6789
  • B.1234
  • C.2345
  • D.456789

9) Which Of The Following Must Be Enclosed In Double Quotes?

  • A. Dates
  • B.Column Alias
  • C.Strings
  • D.All Of The Above

10) Which Of The Following Command Makes The Updates Performed By The Transaction Permanent In The Database?

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

11) Which Command Undo All The Updates Performed By The SQL In The Transaction?

  • A. ROLLBACK
  • B.DELETE
  • C.COMMIT
  • D.CAPITAL LETTERS.

12) Which Of The Following Is Illegal?

  • A. SELECT SYSDATE - (SYSDATE - 2) FROM DUAL;
  • B.SELECT SYSDATE - SYSDATE FROM DUAL;
  • C.SELECT SYSDATE - (SYSDATE + 2) FROM DUAL;
  • D.None Of These

13) Which Of The Following Is NOT A Type Of SQL Constraint?

  • A. PRIMARY KEY
  • B.ALTERNATE KEY
  • C.UNIQUE
  • D.FOREIGN KEY

14) What SQL Command Can Be Used To Delete Columns From A Table?

  • A. MODIFY TABLE TableName DROP ColumnName
  • B.MODIFY TABLE TableName DROP COLUMN ColumnName
  • C.ALTER TABLE TableName DROP ColumnName
  • D.ALTER TABLE TableName DROP COLUMN ColumnName

15) The SQL WHERE Clause:

  • A. Limits The Row Data Are Returned
  • B.Limits The Column Data That Are Returned.
  • C.Both A And B Are Correct.
  • D.Neither A Nor B Are Correct.

16) A Subquery In An SQL SELECT Statement Is Enclosed In:

  • A. Brackets -- [...].
  • B.Parenthesis -- (...).
  • C.Braces -- {...}.
  • D.CAPITAL LETTERS.

17) Which of the following statements cannot be included in the definition of a Transact-SQL user-defined function?

  • A. MOVE CONVERSATION
  • B.GET CONVERSATION GROUP
  • C.RECEIVE
  • D.All of these

18) Which of the user defined function will be preferred for adding two numbers?

  • A. Scalar
  • B.Inline table valued
  • C.Max()
  • D.Min()

19) How many types of triggers are present in SQL Server?

  • A. 9
  • B.8
  • C.4
  • D.6

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

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

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Jun
IOS Swift MCQ
01st
Jun
Hadoop MCQ
01st
Jun
CICS MCQ