• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/62

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

62 Cards in this Set

  • Front
  • Back
Select statements do what?
They extract data from the database.
What is iSQL*plus?
It is a browser environment where SQL commands execute. (different than SQL*Plus)
Does SQL*Plus allow manipultation of database values?
No, thisis a difference between SQL and SQL*Plus
SQL does not have a continuation character, does SQL*Plus have a continuation character?
Yes. A dash (-) used to continue a line that is longer than one line.
SQL can not be abbreviated, can SQL*Plus be abbreviated?
Yes, SQL*Plus can be abbreviated
Sql is a temination character and is entered into a buffer before execution so that a terminiation character is needed to execute immediately. Is SQL*Plus the same?
No, SQL*Plus does not use a termination character and is executed immediately.
What are three main catagories of SQL*Plus environment?
Execute SQL statements
Query results from reports
Create script files.
How many categories are they for SQL*Plus commands and what are they?
7
Enviroment, Format, File Manipulation, Execution, Edit, Interaction, Miscellaneous
What is the statement used in SQL to extract data from the database?
use the SELECT statement from SQL in the iSQL*Plus environment.
Using the SELECT statement can do three operations, what are they?
Projection, Selection and Joining
When using a SELECT statement what does it mean for projection of data?
Protection uses the columns in a table to return data for a query.
When using a SELECT statement what does it mean for selection of data?
Selection uses the rows in a table to return data from a query.
When using a SELECT statement what does it mean for joining of data?
Joining uses tables to bring data together by creating a link between them.
In Oracle when using SQL statements there are three charateristics that describe the SQL command. What are they?
Keywords, Clauses and Statements
What are the explanations of a Keyword, Clause and, Statement in SQL commands.
A keyword refers to an individual SQL element. A Cause refers to part of a SQL statement. A statement is the combination of two or more clauses.
Please explain the syntax of a select statement.
SELECT
*
DISTINCT
column/expression
alias
FROM table
SELECT is a list of one or more columns
DISTINCT suppress duplicates
column/expression selects the namd column or the expression
alias gives select cloumns different headings
FROM table specifies the table containng the columns
When using a SELECT statement to quert columns, what is a way to specify order of the columns?
Specify the columns that you want in the order that you want then to appear in the output.
SQL statements are not case sensitive. True?
YES
SQL Statements can be entered on more than one line. True?
Yes
When using a SELECT statement what does it mean for projection of data?
Protection uses the columns in a table to return data for a query.
When using a SELECT statement what does it mean for selection of data?
Selection uses the rows in a table to return data from a query.
When using a SELECT statement what does it mean for joining of data?
Joining uses tables to bring data together by creating a link between them.
In Oracle when using SQL statements there are three charateristics that describe the SQL command. What are they?
Keywords, Clauses and Statements
What are the explanations of a Keyword, Clause and, Statement in SQL commands.
A keyword refers to an individual SQL element. A Cause refers to part of a SQL statement. A statement is the combination of two or more clauses.
Can keywords in a SQL statement be split across lines or be abbreviated?
No
Clauses are usually placed on separate line for ease of use and readability. True?
Yes
Are indents a recommended way to make code more readable?
Yes
Are Keywords generally entered in lower case followed by other words entered in upper case?
No, Keywords are generally entered in uppercase followed by other words in lowercase.
What are default settings for Column Headings for default heading at the top, columns with characters, columns begining with numbers?
Default headings are centered and uppercase. Characters are left justified and numbers are right justified.
There are four arithmetic operators for SQL, what are they?
+ - * /
What determines operator precedence?
Operator presedence is multiply and divide before adding and subtracting. When operators have the same priority then left to right determines priority and parentneses are used to force prioritized evaluation.
Please define a null value.
A nul value is unavailible, unknown, unassigned, or inapplicable. A null is not the same as a zero or blank space.
When writing an SELECT statement using the alias command what are the rules for using it?
Alias renames a column name
It is useful with calculations
Immediatley follows the column name
Can use the "AS" optionally between column name and alias
Requires double quotation marks if the alias contains spaces or special characters or is case sensitive
What is a concatenation operator?
||
A concatination character (||) can link columns, arithmetic, expressions, or constant values to create a character expression. Columns on either side of the operator are combined to make a single output column.
What is a Literal character string?
Literal strings are free-format text that can be included in the query result and are treated the same as a column in the select list. Data and character literals need to be enclosed by single quotation marks.
What is the main difference between SQL and iSQL*Plus?
SQL is a language and iSQL*Plus is an environment. Therefore commands do not manipulate data in the iSQL*Plus environment
What command can be used to display the table structure
The describe command shows the column names and data types
When using the describe command, how many types are there and what do they mean?
4
Number (p,s) p represent max digits to display and s is the digits to the rigt of the decimal point.
VARCHAR (s) variable length character with max length s
Date from 4712BC to 9999AD
CHAR (s)Fixed-length character value of size s
When saving script files in the iSQL*Plus environment what files types can be used?
HTM (html)
SQL
TXT
What is the use of a from statement?
The FROM keyword can follow the SELECT keyword to tell from which table to pull data.
ex. FROM employees;
The WHERE clause doe what?
The where clause contains a condition that must be met if the condition is true then the row meeting the condition is returned.
The where clause consists of three elements, what are these?
1 column name
2 comparison condition
3 column name, constant, or list of values
Where does the WHERE keyword fit into a statement?
The WHERE keyword forms a clause after the FROM clause.
Charatcter strings and dates are enclosed in single quotation marks. What about number constants?
Number constants should not be enclosed in quotation marks
Are character searches using a WHERE clause case sensitive?
YES therefore 'BALL', 'BAll', 'ball' are all different searches.
What are the comparison conditions for the WHERE clause using these symbols =><?
=, >, <, >=, <=, and <>

!= and ^= can also represent the not equal to condition
What are the meanings of these comparison conditions for WHERE? Between...and...,
IN,LIKE,IS NULL
Between two values (inclusive)
specify lower limit first
IN (set) Match any of a list
LIKE Match a character pattern
Is a NULL value
If you want to display rows based on a range of values what clause should be used?
Use the WHERE, BETWEEN, and AND keywords to form the clause.
WHERE salary BETWEEN 2500 AND 3500
If you would like to test for a set of values in a table what clause should be used? Use the mebership condition.
Use the WHERE and IN keywords to form the clause.
WHERE manager_id IN (100,101, 201) Characters and dates must be enclosed in single quotation marks 'Ronald'
When using these symbols _ and % what do they represent in a clause?
an _ represents one character where as a % represents many characters or zero additional characters.
What operator condition is considered a wild card search?
Like
What is the escape character ?
/
Can wild cards and escape characters be combined?
Yes
WHERE lastname LIKE '_o%'
this clause searches for all names where the second character is an O.
How can the NUL condition be used with WHERE?
IS NULL and IS NOT NULL seaches for values that are unavailible, unassigned, unknown, or inapplicable.
True or False
A logical condition combines the result of two components to produce a single result
TRUE
True or False the following are three logical conditions AND OR NOT
TRUE
What do Logical conditions like AND, OR, NOT allow you to do in a WHERE clause?
It allows one to combine several conditions.
Rules of Precedence are?
1 Arithmetic
2 Concatenation
3 Comparison conditions
4 IS (NOT) NULL, LIKE ,IN
5 (NOT) BETWEEN
6 NOT (logical)
7 AND (logical)
8 Or (logical)
What is the ORDER BY clause?
The ORDER BY clause can be used to sort the rows and it musrt be the last clause of the statement.
What are two variables for the ORDER BY clause?
They are the ASC and DESC which mean ascending and descending order.
What are the defautls for the ORDER BY clause
Ascending is the default.
Numbers display lowest first
Dates are by earliest
Characters are display alphabetical
Null values are displayed last unless desending order is chosen
What does the order of ORDER BY list is the order of sort mean?
This statement means that when using the ORDER BY keyword in a clause that the order of the variables determines the order of their display.
ORDER BY job, salary, name