vs MS SQL Server — SQL Technical Interview Questions & Answers

vs MS SQL Server

vs MS SQL Server

  • SQL Server is Microsoft’s RDBMS (T-SQL). MySQL uses LIMIT; classic SQL Server uses TOP (newer: OFFSET FETCH). Identity vs AUTO_INCREMENT. GETDATE() vs NOW(). SSMS is their GUI, not Workbench.
  • Trap: TOP 5 in MySQL. Trap: Workbench steps in a SQL Server answer.
  • On the example next to this theory: vs MS SQL Server: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.

Technical Interview Tip: Same SQL ideas. LIMIT is MySQL; TOP is classic SQL Server.

Code Examples for vs MS SQL Server

vs MS SQL Server — sample query

-- vs MS SQL Server
CREATE TABLE demo (
  id INTEGER PRIMARY KEY,
  label TEXT NOT NULL,
  qty INTEGER DEFAULT 0
);
INSERT INTO demo (id, label, qty) VALUES
  (1, 'alpha', 2),
  (2, 'beta', 5);
SELECT label, qty FROM demo WHERE qty >= 2 ORDER BY qty DESC;

vs MS SQL Server: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.

How to Explain vs MS SQL Server to an Interviewer

LIMIT in SQL Server?

Classic TOP Newer OFFSET FETCH MySQL: LIMIT