T-SQL – ORDER BY Clause The MS SQL Server ORDER BY clause is used to sort the data in ascending or descending order, based on one or more columns. Some database sort query results in ascending order by default. Syntax Following is the basic syntax of ORDER BY clause. SELECT column-list FROM table_name [WHERE condition] […]
T-SQL – WHERE Clause The MS SQL Server WHERE clause is used to specify a condition while fetching the data from single table or joining with multiple tables. If the given condition is satisfied, only then it returns a specific value from the table. You will have to use WHERE clause to filter the records […]
T-SQL – GROUP BY Clause The SQL Server GROUP BY clause is used in collaboration with the SELECT statement to arrange identical data into groups. The GROUP BY clause follows the WHERE clause in a SELECT statement and precedes the ORDER BY clause. Syntax Following is the basic syntax of GROUP BY clause. The GROUP […]