Abstract
Now that you have the knowledge to write simple SELECT statements, it is time to explore some of the other features of T-SQL that allow you to manipulate how the data is displayed, filtered, or ordered. To create expressions in T-SQL, you use functions and operators along with literal values and columns. The reasons for using expressions in T-SQL code are many. For example, you may want to display only the year of a column of the DATETIME data type on a report, or you may need to calculate a discount based on the order quantity in an order-entry application. Any time the data must be displayed, filtered, or ordered in a way that is different from how it is stored, you can use expressions and functions to manipulate it.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2012 David Guerineau
About this chapter
Cite this chapter
Shaw, S., Kellenberger, K. (2012). Using Functions and Expressions. In: Beginning T-SQL 2012. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-3705-1_3
Download citation
DOI: https://doi.org/10.1007/978-1-4302-3705-1_3
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-3704-4
Online ISBN: 978-1-4302-3705-1
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books