Podcast
Questions and Answers
In SQL, what does the CREATE TABLE command do?
In SQL, what does the CREATE TABLE command do?
- Specifies a new base relation by defining its name, attributes, and data types (correct)
- Deletes an entire table and its definition from the database
- Modifies the existing table structure by adding new columns
- Alters the table by changing the data types of its columns
What is the purpose of the PRIMARY KEY phrase in the CREATE TABLE command?
What is the purpose of the PRIMARY KEY phrase in the CREATE TABLE command?
- To specify a unique constraint on a column
- To ensure that a column does not contain any NULL values
- To define a foreign key constraint between two tables
- To specify the attribute(s) that uniquely identify each tuple in the table (correct)
What does the DROP TABLE command do in SQL?
What does the DROP TABLE command do in SQL?
- Drops all the constraints associated with a table
- Alters the table structure by removing columns
- Deletes all the data from a table
- Removes a relation and its definition from the database (correct)
What is the purpose of the UNIQUE phrase in the CREATE TABLE command?
What is the purpose of the UNIQUE phrase in the CREATE TABLE command?
In SQL, what does the FOREIGN KEY phrase in the CREATE TABLE command do?
In SQL, what does the FOREIGN KEY phrase in the CREATE TABLE command do?