Introduction: In this article we will look at some of the basic T-SQL Queries. These T-SQL Queries are very commonly used in most of the applications and I would like to point out that how easily some of these task can be performed. Returning String Instead of NULL: Consider a situation in which your database table contains NULL and you don't want to return NULL but some message. Like suppose you have a Person table and a Phone Table and a person does not have a phone number so we can easily return a message saying "No Phone Number Found" instead of returning a NULL. SELECT P.Name, 'PhoneNumber' = CASE WHEN Ph.PhoneNumber IS NULL THEN 'No Phone Number Exists' ELSE Ph.PhoneNumber END FROM tblPerson P, tblPhone Ph WHERE P.PersonID = Ph.PersonID The heart and soul of this simple query is the CASE Statement where we check that if the field is NULL or not. If the field is NULL we just replace it...