Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Microsoft SQL Server 2012 Online Developer Test

Topics Covered

  • Querying Microsoft SQL Server 2012 database
  • Architecture and Editions of SQL Server 2012
  • Sorting and Filtering Data
  • Built-In Functions
  • Implementing Error Handling
  • Transactions
  • Design & implementation of a Data Warehouse with Microsoft SQL Server 2012
  • Sequence Object
  • Contained Database
  • Improvement in FILESTREAM Storage
  • Enhancements in Transact-SQL Construct
  • Table-Valued Functions
  • Extended Events
  • Refactoring Requirements
  • XML Data

Useful for hiring

  • SQL server 2012 developer
  • SQL Server Developer
  • MS SQL Server developer
  • Database Application Developer

Start hiring job-fit candidates using this assessment

GET A DEMO

"Interview Mocha's assessments eliminated reliance on resumes and reduced our time to hire by half. Now we spend time only on relevant candidates and take data-driven hiring decisions."

George Nichkov, Gett,
Global Analytics Team Lead
Question

The minimum and maximum value that DATEDIFF function can return is:

Answer
    • -2,147,483,648 and +2,147,483,647

    • -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807

    • -2,147,483,648 and 9,223,372,036,854,775,807

Question

Which code will give an error?

1 -SELECT DATEDIFF_BIG(MILLISECOND,
 '12/01/2015','12/30/2015') 
AS 'Difference in MILLISECOND'

2- SELECT DATEDIFF(MILLISECOND,
 '12/01/2015','12/30/2015')
 AS 'Difference in MILLISECOND'

Answer
    • 1

    • 2

    • 1,2

Question

How to replace NULL by 0 in the dynamic PIVOT query result?

Answer
    • DECLARE @DynamicPivotQuery AS NVARCHAR(max) 
      DECLARE @ColumnName AS NVARCHAR(max) 

      --Get distinct values of the PIVOT Column 
      SELECT @ColumnName = Isnull(@ColumnName + ',', '') 
                           + Quotename(course) 
      FROM   (SELECT DISTINCT course 
              FROM   #coursesales) AS Courses 

      --Prepare the PIVOT query using the dynamic 
      SET @DynamicPivotQuery = N'SELECT Year, ' + @ColumnName 
                               + '  FROM #CourseSales  PIVOT(SUM(Earning)  FOR Course IN (' + @ColumnName 
                               + ')) AS PVTTable' 

      --Execute the Dynamic Pivot Query 
      EXEC Sp_executesql 
        @DynamicPivotQuery 

      go 

    • DECLARE @DynamicPivotQuery      AS NVARCHAR(max), 
              @PivotColumnNames       AS NVARCHAR(max), 
              @PivotSelectColumnNames AS NVARCHAR(max) 

      --Get distinct values of the PIVOT Column 
      SELECT @PivotColumnNames = Isnull(@PivotColumnNames + ',', '') 
                                 + Quotename(course) 
      FROM   (SELECT DISTINCT course 
              FROM   #coursesales) AS Courses 

      --Get distinct values of the PIVOT Column with isnull 
      SELECT @PivotSelectColumnNames  = Isnull(@PivotSelectColumnNames + ',', '')
                                         + 'ISNULL(' + Quotename(course) + ', 0) AS '
                                         + Quotename(course) 
      FROM   (SELECT DISTINCT course 
              FROM   #coursesales) AS Courses 

      --Prepare the PIVOT query using the dynamic 
      SET @DynamicPivotQuery = N'SELECT Year, ' + @PivotSelectColumnNames 
                               + ' FROM #CourseSales PIVOT(SUM(Earning) FOR Course IN (' + @PivotColumnNames 
                               + ')) AS PVTTable' 

      --Execute the Dynamic Pivot Query 
      EXEC Sp_executesql 
        @DynamicPivotQuery

    • DECLARE @DynamicPivotQuery      AS NVARCHAR(max), 
              @PivotColumnNames       AS NVARCHAR(max), 
              @PivotSelectColumnNames AS NVARCHAR(max) 
      DECLARE @DynamicPivotQuery AS NVARCHAR(max) 
      DECLARE @ColumnName AS NVARCHAR(max) 

      --Get distinct values of the PIVOT Column 
      SELECT @ColumnName = Isnull(@ColumnName + ',', '') 
                           + Quotename(course) 
      FROM   (SELECT DISTINCT course 
              FROM   #coursesales) AS Courses 

      --Prepare the PIVOT query using the dynamic 
      SET @DynamicPivotQuery = N'SELECT Year, ' + @ColumnName 
                               + ' FROM #CourseSales FOR Course IN (' + @ColumnName 
                               + ')) AS PVTTable' 

      --Execute the Dynamic Pivot Query 
      EXEC Sp_executesql 
        @DynamicPivotQuery 

      go 

Test details:

SQL server 2012 developer knowledge test enables employers and recruiters to evaluate skills and job readiness of candidates. For this reason, the emphasis is laid upon evaluating the knowledge of applied skills gained through real work experience, rather than theoretical knowledge.

Test Duration              :  20 Minutes

No. of Questions        :  20   (Application Oriented - 15 & Theory-Based - 5)

Type of Questions   :  This test contains MCQ's (Multiple Choice Questions), MAQ's (Multiple Answer Questions), Fill in the Blanks, Descriptive & True or False Questions.

Test description:

SQL server 2012 online test is designed to check the application and testing skills of a Microsoft SQL Server 2012 Developer – as per Industry Standards. MS SQL Server 2012 is one of the editions of Microsoft SQL Server Products which provides new useful features and enhancements than that of previous.Microsoft SQL Server Developer is generally from programming background who is responsible for designing and implementation of a SQL code.
 

MS SQL Server 2012 Developer Test Contains Questions on Following Topics :
  

  • Querying Microsoft SQL Server 2012 database

  • Architecture and Editions of SQL Server 2012

  • Sorting and Filtering Data

  • Built-In Functions

  • Implementing Error Handling, Transactions

  • Design & implementation of a Data Warehouse with Microsoft SQL Server 2012

  • New SQL Server 2012 Features:

    • Sequence Object

    • Contained Database

    • Improvement in FILESTREAM Storage

    • Enhancements in Transact-SQL Construct, etc.

  • Table-Valued Functions

  • Extended Events

  • Refactoring Requirements

  • XML Data


SQL server 2012 developer pre employment test is designed by our subject matter experts to analyze one’s understanding of this discipline. Using powerful reporting, you can have a detailed analysis of the test results to help you make a better hiring decision and predict the candidate’s performance.

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO