Simply SQL by Rudy Limeback

Simply SQL by Rudy Limeback

Author:Rudy Limeback [Limeback, Rudy]
Language: eng
Format: epub, mobi, pdf
ISBN: 9780980455250
Publisher: SitePoint Pty. Ltd.
Published: 2008-08-16T04:00:00+00:00


Operators

Operators can be used within SELECT clause expressions, and we’ll briefly review them here.

Numeric Operators

These include the usual suspects: addition, subtraction, multiplication, and division, represented by the expected symbols: +, -, *, and /. We’ve already seen the multiplication operator used in a SELECT clause expression, in the example in the section called “Group Rows”:

SELECT cartitems.qty * items.price AS total

Note that this is not that same as the star we saw in COUNT(*) previously.

The special unary operators + and - are used to specify signed (negative or positive) values. Sometimes a modulus operator (returns the remainder of a division expression) is available, but often it’s a function like MOD instead. Additional arithmetic operations are accomplished with functions, and there is a large variety available in every database system. Consult your database system’s documentation for details.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.