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 all students details from the tblstudent table.
Get first name from the tblstudent using alias name “StudentName”.
Get first name, last name from the tblstudent table.
Select student details whose name is “David” from tblstudent.
Get first name from tblstudent in upper case.
Get last name from tblstudent in lower case.
Get unique branch from tblstudent table.
Write a query to combine FirstName and LastName and display it as “Full Name”.
Get all student details from tblstudent whose “FirstName” contains ‘a’.
Get all student details from tblstudent whose “FirstName” start with latter ‘d’.
Get all student details from tblstudent whose “FirstName” end with ‘a’.
List all students whose first name start with ‘Ma’ or ‘Da’.
Get all students details from the tblStudent table order by FirstName Ascending.
Get all students details from the tblStudent table order by FirstName Descending
Get all students details from the tblStudent table order by LastName Ascending and Admission fees descending.
Get position of ‘v’ in name ‘David’ from tblstudent.
Select firstname from tblstudent with ‘Hello’ prefix.
Get FirstName from tblstudent after removing white spaces from right side.
Get FirstName from tblstudent after removing white spaces from left side.
Get length of FirstName from tblstudent.
total questions: 92

Questions

92

Views

1406

Best Answers

299

Points

5