Tech Study

sqlserver

250+ SQL Programs for Practice | SQL Tutorial

SQL Tutorial SQL Tutorial provides in-depth knowledge about the Database Management using MS SQL Server, MySQL Server. To understand more …

Read more

Top 100 SQL Queries Interview Questions

Introduction In this article, you will find basic to most puzzled interview queries questions with an example. This article is …

Read more

How to find out Microsoft SQL Server Enterprise Edition Expiration Date

Introduction As you all know Microsoft SQL Server’s evaluation edition expires after 6 months of validity. So in this article, …

Read more

How can I remove duplicate rows from large table

Introduction Remove duplicate rows from large table which has more than 10,000+ rows. DELETE FROM student WHERE ID NOT IN …

Read more

Write a SQL query to get FirstName, Lastname, Scholarship amount from tblStudent and tblScholarship table for all students even if they didn’t get Scolarship

Introduction Write a SQL query to get FirstName, Lastname, Scholarship amount from tblStudent and tblScholarship table for all students even …

Read more

SQL Server Advanced Questions – ‘Join’

The following exercise will help you to improve your MS SQL server query skills effectively. I have used Microsoft SQL …

Read more

Write the query to get branch, no of students in a branch, total admission fees with respect to a branch from tblStudent table order by admission fees descending

Introduction Write the query to get branch, no of students in a branch, total admission fees with respect to a …

Read more

Write the query to get no of students joined with respect to year and month from tblStudent table

Introduction Write the query to get no of students joined with respect to year and month from tblStudent table. I …

Read more

Write the query to get branch wise average admission fees from “tblStudent” table order by admission fees ascending order

Introduction Write the query to get branch wise average admission fees from “tblStudent” table order by admission fees ascending order. …

Read more

Write the query to get the branch and branch wise total(sum) admission fees, display it in ascending order according to admission fees

Introduction Write the query to get the branch and branch wise total(sum) admission fees, display it in ascending order according …

Read more

Write a query to get how many students exist in tblstudent

Introduction Write a query to get how many students exist in tblstudent. I have used Microsoft SQL server 2008 R2 …

Read more

Write a query to get students details from “tblStudent” whose admission fees is between 900 and 1500

Introduction Write a query to get students details from “tblStudent” whose admission fees is between 900 and 1500. I have …

Read more

Write a query to get students details from “tblStudent” whose admission fees is greater than 1200

Introduction Write a query to get students details from “tblStudent” whose admission fees is greater than 1200. I have used …

Read more

Write a query to get students details from “tblStudent” whose admission fees is less than 1200

Introduction Write a query to get students details from “tblStudent” whose admission fees is less than 1200. I have used …

Read more

Write a query to select FirstName, LastName from tblStudent table in singal column

Introduction Write a query to select FirstName, LastName from tblStudent table in singal column. I have used Microsoft SQL server …

Read more

Write a query to select Minimum Admission fees from tblStudent table

Introduction Write a query to select Minimum Admission fees from tblStudent table. I have used Microsoft SQL server 2008 R2 …

Read more

Write a query to select highest Admission fees from tblStudent table

Introduction Write a query to select highest Admission fees from tblStudent table. I have used Microsoft SQL server 2008 R2 …

Read more

Write a query to select TOP 2 Admission fees from tblStudent table

Introduction Write a query to select TOP 2 Admission fees from tblStudent table. I have used Microsoft SQL server 2008 …

Read more

Write a query to select second highest admission fees from “tblStudent” table

Introduction Write a query to select second highest admission fees from “tblStudent” table. I have used Microsoft SQL server 2008 …

Read more

Write a query to select TOP Nth (any number) admission fees from tblStudent table

Introduction Write a query to select TOP Nth (any number) admission fees from tblStudent table. I have used Microsoft SQL …

Read more

List of SQL Query questions on Top, Union, admission fees and Group by questions

The following exercise will help you to improve your MS SQL server query skills effectively. I have used Microsoft SQL …

Read more

Write a Query to get only time part of the “AdmissionDate” from tblStudent

Introduction Write a Query to get only time part of the “AdmissionDate” from tblStudent. I have used Microsoft SQL server …

Read more

Write a Query to get “AdmissionDate” in “yyyy/mm/dd” format, ex- “2019/05/06”

Introduction Write a Query to get “AdmissionDate” in “yyyy/mm/dd” format, ex- “2019/05/06”. I have used Microsoft SQL server 2008 R2 …

Read more

Write a Query to get “AdmissionDate” in “dd mmm yyyy” format, ex- “06 May 2019”

Introduction Write a Query to get “AdmissionDate” in “dd mmm yyyy” format, ex- “06 May 2019”. I have used Microsoft …

Read more

Write a Query to get the first name, last name, current date, admission date and difference between current date and admission date in year

Introduction Write a Query to get the first name, last name, current date, admission date and difference between current date …

Read more

Write a Query to get the first name, last name, current date, admission date and difference between current date and admission date in month

Introduction Write a Query to get the first name, last name, current date, admission date and difference between current date …

Read more

Write a SQL query to Get the first name, last name, current date, admission date and difference between current date and admission date in days

Introduction Write a SQL query to Get the first name, last name, current date, admission date and difference between current …

Read more

Write a SQL query to get all student details from tblStudent table whose admission date between ‘2016-01-01’ and ‘2018-01-01’

Introduction Write a SQL query to get all student details from tblStudent table whose admission date between ‘2016-01-01’ and ‘2018-01-01’. …

Read more

Write a SQL query to get only year part of admission date from tblStudent

Introduction Write a SQL query to get only year part of admission date from tblStudent. I have used Microsoft SQL …

Read more

Write a SQL query to get only month part of admission date from tblStudent

Introduction Write a SQL query to get only month part of admission date from tblStudent. I have used Microsoft SQL …

Read more

Write a SQL query to get database date

Introduction Write a SQL query to get database date. I have used Microsoft SQL server 2008 R2 for the following …

Read more

Write a SQL query to get admission date and time from tblStudent table

Introduction Write a SQL query to get admission date and time from tblStudent table. I have used Microsoft SQL server …

Read more

Write a SQL query to get student details from tblStudent table whose admission month is ‘June’

Introduction Write a SQL query to get student details from tblStudent table whose admission month is ‘June’. I have used …

Read more

Write a SQL query to get student details from tblStudent table whose admission date is before January 31st

Introduction Write a SQL query to get student details from tblStudent table whose admission date is before January 31st. I …

Read more

Write a SQL query to get student details from tblStudent table whose admission date is after January 31st 2018

Introduction Write a SQL query to get student details from tblStudent table whose admission date is after January 31st 2018. …

Read more

Write a SQL query to get student details from tblStudent table whose admission year is “2016”

Introduction Write a SQL query to get student details from tblStudent table whose admission year is “2016”. I have used …

Read more

Write a Sql query get first name, admission year, admission month and admission date from tblStudent table

Introduction Write a Sql query get first name, admission year, admission month and admission date from tblStudent table. I have …

Read more

List of SQL Query questions on Datetime

The following exercise will help you to improve your MS SQL server query skills effectively. I have used Microsoft SQL …

Read more

Write a SQL query get fristname from tblstudent not start with any single character between a-l

Introduction Write a SQL query get fristname from tblstudent not start with any single character between a-l. I have used …

Read more

Write a SQL query get all students details from tblStudent whose first name ends with ‘a’ and name contains 4 letters

Introduction Write a SQL query get all students details from tblStudent whose first name ends with ‘a’ and name contains …

Read more

Write a SQL query get all students details from tblStudent whose first name starts with ‘m’ and name contains 4 letters

Introduction Write a SQL query get all students details from tblStudent whose first name starts with ‘m’ and name contains …

Read more

Write a SQL query to get FristName from tblStudent table after replacing ‘a’ with ‘$’

Introduction Write a SQL query to get FristName from tblStudent table after replacing ‘a’ with ‘$’. I have used Microsoft …

Read more

Write a SQL query to get length of FirstName from tblstudent

Introduction Write a SQL query to get length of FirstName from tblstudent. I have used Microsoft SQL server 2008 R2 …

Read more

Write a SQL query to get FirstName from tblstudent after removing white spaces from left side

Introduction Write a SQL query to get FirstName from tblstudent after removing white spaces from left side. I have used …

Read more

Write a SQL query to get FirstName from tblstudent after removing white spaces from right side

Introduction Write a SQL query to get FirstName from tblstudent after removing white spaces from right side. I have used …

Read more

Write a SQL query to get firstname from tblstudent with Hello prefix

Introduction Write a SQL query to get firstname from tblstudent with Hello prefix. I have used Microsoft SQL server 2008 …

Read more

Write a SQL query to get position of ‘v’ in name ‘David’ from tblstudent

Introduction Write a SQL query to get position of ‘v’ in name ‘David’ from tblstudent. I have used Microsoft SQL …

Read more

Write a SQL query to get all students details from the tblStudent table order by LastName Ascending and Admission fees descending

Introduction Write a SQL query to get all students details from the tblStudent table order by LastName Ascending and Admission …

Read more

Write a SQL query to get all students details from the tblStudent table order by FirstName Descending

Introduction Write a SQL query to get all students details from the tblStudent table order by FirstName Descending. I have …

Read more

Write a SQL query to get all students details from the tblStudent table order by FirstName Ascending

Introduction Write a SQL query to get all students details from the tblStudent table order by FirstName Ascending. I have …

Read more

Write a SQL query to get list of all students whose first name start with ‘Ma’ or ‘Da’

Introduction Write a SQL query to get list of all students whose first name start with ‘Ma’ or ‘Da’. I …

Read more

Write a SQL query to get all student details from tblstudent whose “FirstName” ends with ‘a’

Introduction Write a SQL query to get all student details from tblstudent whose “FirstName” ends with ‘a’. I have used …

Read more

Write a SQL query to get all student details from tblstudent whose “FirstName” start with letter ‘d’

Introduction Write a SQL query to get all student details from tblstudent whose “FirstName” start with letter ‘d’. I have …

Read more

Write a SQL query to get all student details from tblstudent whose “FirstName” contains ‘a’

Introduction Write a SQL query to get all student details from tblstudent whose “FirstName” contains ‘a’. I have used Microsoft …

Read more

Write a SQL query to combine firstname and lastname and display it as “Full Name”

Introduction Write a SQL ( Structured Query Language ) query to combine firstname and lastname and display it as “Full …

Read more

Write a SQL query to get unique branch from tblstudent table

Introduction Write a SQL query to get unique branch from tblstudent table. I have used Microsoft SQL server 2008 R2 …

Read more

Write a SQL query to get first name from tblstudent in lower case

Introduction Write a SQL query to get first name from tblstudent in lower case. I have used Microsoft SQL server …

Read more

Write a SQL query to get first name from tblstudent in upper case

Introduction Write a SQL query to get first name from tblstudent in upper case. I have used Microsoft SQL server …

Read more

Write a SQL query to get details whose firstname starts with name “David”

Introduction Write a SQL query to get details whose firstname starts with name “David”. I have used Microsoft SQL server …

Read more

Write a SQL query to display firstname and branch of student, who belongs to the branch ‘Computer Engineering’

Introduction Write a SQL query to display firstname and branch of student, who belongs to the branch ‘Computer Engineering’. I …

Read more

Write a query to display only firstname and branch from table student

Introduction Write a query to display only firstname and branch from table student. I have used Microsoft SQL server 2008 …

Read more

Write a SQL query to display sum of two numbers 10 and 15

Introduction Write a SQL query to display sum of two numbers 10 and 15. I have used Microsoft SQL server …

Read more

Write a SQL query to display a string “Hello World!”

Introduction Write a SQL query to display a string “Hello World!”. I have used Microsoft SQL server 2008 R2 for …

Read more

Write a SQL statement to display all students information

Introduction I have used Microsoft SQL server 2008 R2 for the following demo.  tblstudent StudentId FirstName LastName Admission_fee Admission_date Branch …

Read more

MS SQL Queries to retrieve data from tables

In this article, you will find basic to most puzzled Microsoft SQL Server queries to retrieve data from tables with …

Read more