An SQL ______ is a complete command composed of one or more clauses. A
______ groups SQL keywords like SELECT, FROM, and WHERE with table
names like City, column names like Name, and conditions like Population >
100000
statement, clause
The SQL language is divided into five sublanguages:
Data Definition Language (DDL) defines the structure of the database.
Data Query Language (DQL) retrieves data from the database.
Data Manipulation Language (DML) manipulates data stored in a database.
Data Control Language (DCL) controls database user access.
Data Transaction Language (DTL) manages database transactions.
The ______ DATABASE statement creates a new database. Once a
database is created, tables can be added to the database. The ____
DATABASE statement deletes the database, including all tables in the
database.
,CREATE, DROP
The _____ statement provides database users and administrators with
information about databases, the database contents (tables, columns, etc.),
and server status information.
SHOW
Commonly used SHOW statements include:
SHOW DATABASES lists databases available in the database system.
SHOW TABLES lists tables available in the currently selected database.
SHOW COLUMNS lists columns available in a specific table named by a
FROM clause.
SHOW CREATE TABLE shows the CREATE TABLE statement for a given
table.
The ____ statement selects a database and is required to show information
about tables within a specific database.
USE
SHOW AND USE EXAMPLE
, When creating a table, every table column must be assigned a data type.
Common data types include: integer, decimal, date and time, and character.
Most databases allow integer and decimal numbers to be signed or unsigned.
A ____ number is a number that may be negative.
An _______ number is a number that cannot be negative.
signed, unsigned
Integer Types
Decimal Types
Date and Time Types
Character Types
T or F?
The statement DROP Employee; deletes the Employee table.
False