Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TSQL interview questions you ask [closed]

Google search turns up some links to tsql questions. I was wondering what would SO experts would ask in an interview for TSQL.

like image 903
dotnet-practitioner Avatar asked Apr 19 '09 18:04

dotnet-practitioner


People also ask

What is SQL very short answer?

SQL (structured querying language) is a computer language used to create, update, and modify a database. It is the standard language for Relational Database System. All the RDMS like MySQL, MS Access, Oracle, and SQL Server use SQL as their standard database language.


3 Answers

Here are some of the most common questions I've been asked as an ASP.Net developer with strong SQL Server skills:

  • Name and describe the different kinds of JOINs
  • What is COALESCE?
  • Explain primary and foreign keys
  • What would you do to optimize slow-running queries?
  • What is the difference between DELETE and TRUNCATE?
like image 96
DOK Avatar answered Oct 17 '22 08:10

DOK


There are a bunch of questions here: SQL Server Quiz, Can You Answer All These?

A biggie is of course how can you code to minimize deadlocks

Take the code below for example, 80% of people get that wrong

What will be the output of the following?

SELECT 3/2
like image 35
SQLMenace Avatar answered Oct 17 '22 07:10

SQLMenace


In SQL query section (to extend DOK):

  • How would you handle NULL problems? (ie. NULL - 25 = ?)
  • Variations for CASE in SELECTs (pros/cons)
  • User function vs. stored procedure performance
  • .NET/SQL integration (pros/cons)
  • How would you and why chain SQL queries? (via god-query, view, stored procedures etc.)
like image 28
boj Avatar answered Oct 17 '22 06:10

boj