Category Archives: Codes

Sample SQL Test

Sample SQL Server Test Q = Question A = Answer C = Comments Q1. What does SQL Stand for? A1. Structured Query Language C1. This question was probably asked to weed out candidates who answer “Sequel” or guess. Q2. Write a SQL query to select everything in a table. A2. SELECT * FROM <table> C2.

Read More

Basic T-SQL Join Where…

Lets say you have two tables: Employees and Profile.  You need to find everyone who is over 21. Employees: UserID, int Name, varchar(5) 1, Peter 2, Cathy 3, Manuel 4, Jonathan Profile: UserID, int Birthday, date 1, 2010-03-13 2, 1997-06-21 3, 1988-04-16 4, 2013-08-22 select Name from Employees as e join Profile as p on e.UserId=p.UserID where DATEADD(YY,21,Birthday) <

Read More