Zybooks Questions Flashcards
(40 cards)
When to use DISTINCT keyword?
To remove duplicate values from query results
When to use UNIQUE keyword?
Constraint on column to make sure they only contain unique values
What is Data Definition Language (DDL)?
Defines database structure ie CREATE TABLE
What is Data Query Language (DQL)?
Retrieves data ie SELECT
What is Data Manipulation Language (DML)?
Inserts, updates, deletes in database
_____ may appear in each cell.
Exactly one value
What is the correct statement format to drop a table?
DROP Table tableName;
What is the statement to do the following – Delete the column ShortDesc. from Deparment table?
ALTER TABLE Department DROP ShortDesc;
What are WITH CHECK OPTIONS?
Database rejects inserts and updates that do not satisfy the view query
What is CHECK when used with a constraint?
A way to check if values meet a condition
How do you add or change constraint on an existing column?
Use CHANGE —- CHANGE table column datatype constraint. This is for unnamed constraints
How do you add a named constraint to an existing column?
Use ADD CONSTRAINT in an ALTER TABLE statement
Can you add a value with NULL?
NO
________ languages contain control flow statements but no classes
Procedural
_____ is the leading declarative language.
SQL
SQL uses many keywords, like SELECT, FROM, and WHERE. C relies heavily on punctuation, like {} and #. This is an example of the ______ gap.
Syntax
The EXEC SQL keyword is used in procedural SQL. T/F
False
Usually generates a network round trip for each SQL query.
Embedded SQL
Affords the greatest database security.
Procedural SQL
Which form of SQL needs a precompiler
Embedded SQL
Most Procedural SQL languages implement the entire SQL/PSM standard T/F
False
First character in a user-defined variable.
@
Consists of a simple or compound statement.
Body
May appear in the body of a stored procedure.
CALL