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×

Transact SQL (T SQL) Online Assessment Test

Topics Covered

  • Nested Cursors
  •  Top Filters
  • JOIN
  • MERGE
  • Pivot Table
  • Loops
  • Common Table Expressions

Useful for hiring

  • T-SQL Developer
  • Sr. T-SQL Developer
  • SQL Developer- T SQL
  • SQL Server Database Developer

Start hiring job-fit candidates using this assessment

GET A DEMO

"We are impressed with Interview Mocha's comprehensive IT skill test batteries and their ability to provide tailor-made assessments quickly. The results we got from Interview Mocha exceeded our expectations, employees found the tests quick, fun, and a benchmark of their knowledge."

Ajay Garg, Siemens,
Associate Manager
Question

What is true regarding scalar subquery?

Note: There can be multiple correct answers to this question.

Answer
    • You can not substitute the technique that uses a variable with an embedded subquery.
       

    • If a scalar subquery returns no value, it returns " ".
       

    • Returns a single value—regardless of whether it is self-contained.
       

    • Can appear anywhere in the outer query where a single-valued expression can appear.
       

    • If a scalar subquery can return more than one value, it might fail at run time.
       

Question

Which of the following SQL statements is correct?

Answer
    • SELECT customername, Count(customername) 
      FROM orders;
       

    • SELECT customername, Count(customername) 
      FROM orders 
      GROUP BY customername;
       

    • SELECT customername, Count(customername) 
      FROM orders 
      ORDER BY customername;
       

Question

What will be the result of running this script, without any additional operations? 

Script:
 

USE loxf;goBEGIN 
DISTRIBUTED TRANSACTION;DELETE candidate 
FROM   a local instance.DELETE datatbasename.dbo.tbluserprofile 
WHERE  userindex = 13;DELETE candidate 
FROM   remote instance.DELETE remoteserver.datatbasename.dbo.tbluserprofile
WHERE  userindex = 13;COMMIT TRANSACTION;go

Answer
    • Candidates will be deleted from remote instance first.
       

    • Candidates will be deleted from local instance then same from a remote distance.
       

    • Error: Could not find server 'RemoteServer'.
       

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