Multiple Choice Concepts Flashcards

1
Q

Which SQL command is an example of data definition language (DDL)?

  • UPDATE
  • ALTER
  • SELECT
  • DELETE
A

The correct answer is:

ALTER

The ALTER command is an example of Data Definition Language (DDL) in SQL, which is used to define, modify, or delete database structures like tables and columns. Other DDL commands include CREATE, DROP, and TRUNCATE.

The other options are as follows:

UPDATE is a Data Manipulation Language (DML) command, used to modify data in existing records.
SELECT is a DML command used to retrieve data from a database.
DELETE is also a DML command, used to remove data from a table.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Data Definition Language (DDL)

A

defines the structure of the database. CREATE, ALTER, DROP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Data Query Language (DQL)

A

retrieves data from the database. SELECT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Data Manipulation Language (DML)

A

Manipulates data stored in a database. INSERT, UPDATE, DELETE.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Data Control Language (DCL)

A

controls database user access.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Data Transaction Language (DTL)

A

manages database transactions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you add a check statement into a table creation statement?

A

BirthDate DATE CHECK (BirthDate >= ‘2015-01-01’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

INNER JOIN

A

selects only matching left and right table rows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

FULL JOIN

A

selects all left and right table rows, regardless of match.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

LEFT JOIN

A

selects all left table rows, but only matching right table rows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

RIGHT JOIN

A

selects all right table rows, but only matching left table rows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly