SQL - LDD and LMD Fundamentals

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/22

flashcard set

Earn XP

Description and Tags

Fill-in-the-blank practice flashcards covering SQL data definition language (LDD), data manipulation language (LMD), aggregation functions, grouping, and constraints.

23 Terms

1
New cards

In SQL, the aggregate function that computes the total sum of a column is __________.

SUM

2
New cards

To retrieve the lowest value among a set of column values, SQL provides the aggregate function __________.

MIN

3
New cards

To find the highest value in a specified column, SQL uses the aggregate function __________.

MAX

4
New cards

The aggregate function that computes the sum divided by the number of entries is __________.

AVG

5
New cards

The aggregate function that serves as a counter to return the total number of rows or values is __________.

COUNT

6
New cards

To temporarily rename a column or assign an alias in a query, SQL uses the keyword __________.

AS

7
New cards

In SQL, __________ is used to group data by common attributes, often indicated by the need to aggregate per 'each' category.

GROUP BY

8
New cards

Because WHERE cannot be applied directly to aggregate functions, SQL uses the __________ clause to filter aggregated groups.

HAVING

9
New cards

In an ORDER BY clause, results are sorted in ascending order using the keyword __________.

ASC

10
New cards

In an ORDER BY clause, results are sorted in descending order using the keyword __________.

DESC

11
New cards

Under LDD (Data Definition Language), the command used to define a new database structure is __________.

CREATE TABLE

12
New cards

In a relational schema description, a foreign key is denoted by a(n) __________ next to the column name.

#

13
New cards

In SQL data types, __________ defines a maximum fixed length where values of shorter lengths are acceptable.

VARCHAR

14
New cards

The data type CHAR represents a(n) __________ length, meaning inputs with fewer or more characters than specified are invalid.

fixed

15
New cards

To add a new column to an existing table, the syntax is ALTER TABLE 'table' __________ 'colonne' type;.

ADD

16
New cards

To delete an existing column from a table, the statement syntax is ALTER TABLE 'table' __________ 'colonne';.

DROP

17
New cards

To enforce a mandatory value on a column in an existing table, the statement is ALTER TABLE 'table' MODIFY 'colonne' type SET __________;.

NOT NULL

18
New cards

To enforce a condition such as column > 0 via an ALTER TABLE statement, SQL uses a(n) __________ constraint.

CHECK

19
New cards

To automatically assign a predefined value when no value is provided, SQL uses the __________ constraint.

DEFAULT

20
New cards

To remove a primary key from an existing table, the command is ALTER TABLE 'table' DROP CONSTRAINT __________;.

PRIMARY KEY

21
New cards

Under LMD, the statement used to insert new records into a table is __________.

INSERT INTO

22
New cards

In SQL, the command used to modify existing values in table fields based on a condition is __________.

UPDATE

23
New cards

To remove existing rows from a table that satisfy a specific condition, SQL uses the __________ FROM statement.

DELETE