... customers whose name contains the word ‘‘bank.’’
In the second situation, we will extend the idea of inexact matches to include the
possibility of matching by the sound of a word or phrase. For instance, ... '%LOVE%'
85
One final note about the IN operator. There is a second way to use the IN,
which is substantially different from the syntax just discussed. In...
... OS
is a registered trademark of Apple Inc. PostgreSQL is a trademark of
PostgreSQL Inc and the Regents of the University of California.
Allothertrademarksarethepropertyoftheirrespectiveowners.
Allimages†CengageLearningunlessotherwisenoted.
LibraryofCongressControlNumber:2010925128
ISBN-13:978-1-4354-5751-5
ISBN-10:1-4354-5751-X
Course ... Lisa
The
Language of SQL
Larry Rocko...
... types of columns. The answer is to use a column
alias. The term alias means an alternate name. Here’s an example of how to use a
column alias with the Microsoft SQL Server version of the previous
SELECT
statement:
SELECT
OrderID,
FirstName,
LastName,
FirstName ... Harper
The fourth column now has a header. The keyword AS is used to specify a col-
umn alias, which immediately...
... ability to use functions, most of the data available
in spreadsheets would be of limited value. The same is true in the world of SQL.
Your familiarity with some of the most commonly used SQL functions ... values together. We also discussed the related topic of column
aliases, which are often employed when using calculated fields.
In the next chapter, we’ll be moving on t...
... sort
of code for the sound of the phrase. The first character is always the first letter of
the phrase. In this case, the first character is S because both Smith and Smythe
begin with an S.
The ... are calculated from an analysis of the sound of
the rest of the phrase. Internally, the function first removes all vowels and the
letter Y. So, the function ta...
... notice that the VALUES keyword
is used as a prefix to lists of values to be inserted into the table. The statement
lists each row of data in a separate set of parentheses. Virginia Jones of Ohio ... take us completely out of the realm of
data retrieval and move us squarely into issues surrounding the need to update
data. The business of maintaining data doesn’t prese...
... The AND Operator 72
The OR Operator 73
Using Parentheses 73
Multiple Sets of Parentheses 75
The NOT Operator 76
The BETWEEN Operator 79
The IN Operator 80
Boolean Logic ... area of expertise is with data warehouse
systems and reporting tools. He recently developed a suite of BI tools for ASA P
Software, a subsidiary of Dell Inc. He holds an MBA from the University of
Chi...
... the
introduction of any book they happen to read and then proceed immediately to
the first real chapter.
With that fact firmly in mind, we will only cover relatively unimportant material
in the ... Appendix D, for a description of the files available on the companion
Web site. These files list all SQL statements and provide all data shown in
the book.
You may download the co...
... that time.
Generally speaking, there are three major components of the SQL language. The
first is called DML, or Data Manipulation Language. This module of the language
allows you to retrieve, ... been The Logic of SQL. This is because, like all computer languages, the
language of SQL has much more to do with cold, hard logic than with English
vocabulary.
Nevertheless,...
... stored in any number of
tables. The term relational is used to indicate that the tables are related to each
other. For example, let’s take the simple case of a database consisting of only two
tables: ... and the data they contain. The
common custom is to display a table as a grid of rows and columns. Each row
represents a record in the table. Each column represents a field...