Similar Collections


In this study list, you will find basic to most puzzled interview queries questions with an example. This article is very useful for those who are preparing for an interview in IT company. Whether you are experienced or fresher, this study list will cover all Microsoft SQL server interview questions from basic to advanced level.
So, before starting let’s create and populate tblstudent and tblScholarship table using following script.

Create table tblStudent(    StudentId int,    FirstName varchar(50),    LastName varchar(50),    Admission_fee int,    Admission_date datetime,    Branch varchar(50),)
Create table tblScholarship(    Student_ref_id int,    Scholarship_Date date,    Scholarship_Amount int)

questions

Title
Get FristName from tblStudent table after replacing ‘a’ with ‘$’.
Get all students details from tblStudent whose first name starts with ‘m’ and name contains 4 letters.
Get all students details from tblStudent whose first name ends with ‘a’ and name contains 4 letters.
Get fristname from tblstudent not start with any single character between a-p.
Get first name, admission year, admission month and admission date from tblStudent table.
Get student details from tblStudent table whose admission year is “2015”.
Get student details from tblStudent table whose admission date is after January 31st.
Get student details from tblStudent table whose admission date is before January 31st.
Get student details from tblStudent table whose admission month is “January”.
Get admission date and time from tblStudent table.
Get database date.
Get UTC date.
Get only month part of admission date from tblStudent.
Get only year part of admission date from tblStudent.
Get all student details from tblStudent table whose admission date between ‘2015-01-01’ and ‘2016-01-01’.
Get the first name, last name, current date, admission date and difference between current date and admission date in days.
Get the first name, last name, current date, admission date and difference between current date and admission date in month.
Get the first name, last name, current date, admission date and difference between current date and admission date in year.
Show “AdmissionDate” in “dd mmm yyyy” format, ex- “06 May 2016”.
Show “AdmissionDate” in “yyyy/mm/dd” format, ex- “2016/05/06”.
total questions: 92

Questions

92

Views

1522

Best Answers

299

Points

5