Multiple Choice Concepts Flashcards
Which SQL command is an example of data definition language (DDL)?
- UPDATE
- ALTER
- SELECT
- DELETE
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.
Data Definition Language (DDL)
defines the structure of the database. CREATE, ALTER, DROP.
Data Query Language (DQL)
retrieves data from the database. SELECT
Data Manipulation Language (DML)
Manipulates data stored in a database. INSERT, UPDATE, DELETE.
Data Control Language (DCL)
controls database user access.
Data Transaction Language (DTL)
manages database transactions.
How do you add a check statement into a table creation statement?
BirthDate DATE CHECK (BirthDate >= ‘2015-01-01’)
INNER JOIN
selects only matching left and right table rows.
FULL JOIN
selects all left and right table rows, regardless of match.
LEFT JOIN
selects all left table rows, but only matching right table rows.
RIGHT JOIN
selects all right table rows, but only matching left table rows.