Collections:
"AS" - Naming Query Output Columns in SQL Server
How To Name Query Output Columns in SQL Server?
✍: FYIcenter.com
Each column in the query output has a default name. If you don't like the default name, you can specify a new name for any column in the query output by using the AS clause. The following statement shows you a good example:
SELECT tag AS Category, YEAR(created) AS Year, COUNT(*) AS Counts FROM fyi_links GROUP BY tag, YEAR(created) ORDER BY COUNT(*) DESC GO Category Year Counts SQA 2003 1 DEV 2004 1 DBA 2005 1 DBA 2006 1 DEV 2006 1 DBA 2007 1 SQA 2007 1
⇒ What Is a Subquery in a SELECT Query Statement in SQL Server
⇐ Writing Inner Joins with the WHERE Clause in SQL Server
⇑ Using SELECT Statements with Joins and Subqueries in SQL Server
2016-10-29, 2136🔥, 0💬
Popular Posts:
Can You Drop an Index Associated with a Unique or Primary Key Constraint in Oracle? You can not dele...
How To Change the Name of a Database User in SQL Server? If you want to change the name of an existi...
What Happens to Your Transactions When ERROR 1205 Occurred in MySQL? If your transaction receives th...
How To Use GO Command in "sqlcmd" in SQL Server? "sqlcmd" is a command line client application to ru...
What is dba.FYIcenter.com Website about? dba.FYIcenter.com is a Website for DBAs (database administr...