chapter 2 Flashcards
why can the describe command be abbreviated
In general, SQL keywords cannot be abbreviated. DESCRIBE is an Oracle Proprietary command, which is
why it can be abbreviated to DESC.
what does the desc cmd return
table name
data types
primary keys
foreign keys
nullable columns
length
precision
scale
what is concatenation
it means to connect or link together in a series
symbol for concatenation
||
double pipe character
when values are concatenated the result is a __________
character string
what happens when you don’t use a column alias when doing a concatenation operation
column aliases are useful when performing concatenation so that the default select line does not appear as the column heading
what is a literal value
it is a fixed data value such as a character, number or date
True or False
Number literals do not have to be enclosed in single quotes
True
what command will you use to find out how many unique instances of something exist
DISTINCT COMMAND
what is the syntax for distinct
select distinct <column_name> from <table_name>;</table_name></column_name>
Where in the query does the distinct command appear
Must appear directly after the select keyword
______ is optional in a select statement
Where clause
______- cannot be used in where clause
Alias
what are the comparison operators for not equal to
^=
!=
<>
character strings and dates in the where clause must be enclosed in ______
single quotation marks ‘ ‘
all character searches in the where clause are _____
case - sensitive
What are the acceptable formats for date values
–> dash
–> forward slash
they can be in either upper, lower or initcap format
also remember to use 4 digit year values
what is the between …and operator used for
it is used to select and display rows based on a range of values which are inclusive of the specified lower and upper limits
_____ value must be listed first in the between … and operator
lower limit
is there a performance benefit/drawback in using >= and <= over between …and operator ?
No, between …and is used over >= and <= as it is simpler to read
the ‘in’ condition is also known as ?
membership condition
what is the in condition used for
it is used to test whether a value is IN a specified set of values
what is the LIKE condition in sql
allows you to select rows that match either characters, dates, or number patterns
what are 2 wildcard characters in sql
% and _ (underscore)