Practice Midterm Flashcards
True or False? The keyword BETWEEN can be used in a WHERE clause to refer to a range of values.
True
True or False? To establish a range of values, < and > can be used.
True
True or False? If you are going to use a combination of three or more AND and OR conditions, it is often easier to
use the NOT and NOT IN operators.
True
True or False? The keyword LIKE can be used in a WHERE clause to refer to a range of values.
False
True or False? The format SELECT-FROM-WHERE is the fundamental framework of SQL SELECT statements.
True
True or False? The SQL statement: SELECT Number1 + Number2 AS Total FROM NUMBER_TABLE; adds two
numbers from each row together and lists the results in a column named Total.
True
True or False? Data Manipulation Language (DML) commands are used to define a database, including creating,
altering, and dropping tables and establishing constraints.
False
True or False? The result of every SQL query is a table.
True
True or False? The wildcard asterisk (*) is the Oracle SQL standard for indicating “any sequence of characters”.
False
True or False? The SQL keyword GROUP BY instructs the DBMS to group together those rows that have the same
value in a column.
True
Which statement is wrong about PRIMARY KEY constraint in SQL?
The Primary key…
a) uniquely identifies each record in a SQL database table.
b) can be made based on multiple columns
c) must be made of any single columns.
d) must contain UNIQUE values.
c) Primary key must be made of any single columns.
In existing table, ALTER TABLE statement is used to:
a) Add columns.
b) Add constraints.
c) Delete columns.
What is the SQL Query to delete all rows in a table without deleting the table (structure, attributes, and indexes).
DELETE FROM table_name;
In a table, a column contains duplicate value, if you want to list all different value only, then which SQL
clause is used?
DISTINCT
To give a temporary name to a table, or a column in a table for more readability, what is used?
aliases