Collections:
What Is a SELECT Query Statement in SQL Server
What Is a SELECT Query Statement in SQL Server?
✍: FYIcenter.com
The SELECT statement is also called the query statement. It is the most frequently used SQL statement in any database application. SELECT statements allows you to retrieve data from one or more tables or views, with different selection criteria, grouping criteria and sorting orders.
A SELETE statement has the following basic syntax:
SELECT select_list FROM table_source WHERE search_condition GROUP BY group_by_expression HAVING search_condition ORDER BY order_by_expression
Here is an example of a SELECT statement with all clauses mentioned above:
SELECT SalesOrderID, SUM(LineTotal) AS TotalPrice FROM SalesLT.SalesOrderDetail WHERE ModifiedDate > '2004-05-01' GROUP BY SalesOrderID HAVING COUNT(*) > 30 ORDER BY TotalPrice DESC
⇒ Testing Table for SELECT Statements in SQL Server
⇐ Using SELECT Statements and GROUP BY Clauses in SQL Server
⇑ Using SELECT Statements and GROUP BY Clauses in SQL Server
2016-10-26, 3129🔥, 0💬
Popular Posts:
How to check if two JSON values have overlaps using the JSON_OVERLAPS() function? JSON_OVERLAPS(json...
Where to find MySQL database server tutorials? Here is a collection of tutorials, tips and FAQs for ...
Can Date and Time Values Be Converted into Integers in SQL Server Transact-SQL? Can date and time va...
How To Enter Unicode Character String Literals in SQL Server Transact-SQL? Unicode characters are mu...
How to obtain the number of rows found by the last SELECT statement using the FOUND_ROWS() function?...