Search Header Logo

SQL Quiz

Authored by Binod Paudyal

Computers

University

Used 4+ times

SQL Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of the CREATE TABLE command in SQL?

To create a new table in the database

To update an existing table in the database

To delete a table from the database

To retrieve data from a table in the database

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Explain the difference between the ALTER TABLE and DROP TABLE commands in SQL.

The ALTER TABLE command is used to add a new column to a table, while the DROP TABLE command is used to rename a table.

The ALTER TABLE command is used to create a new table, while the DROP TABLE command is used to update the data in a table.

The ALTER TABLE command is used to modify an existing table, while the DROP TABLE command is used to delete an entire table.

The ALTER TABLE command is used to delete an entire table, while the DROP TABLE command is used to modify an existing table.

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How is the CONSTRAINT keyword used in SQL DDL commands?

It is used to perform arithmetic operations on the data in a table.

It is used to create a new database in SQL.

It is used to retrieve data from a table in SQL.

It is used to define rules or restrictions for the data in a table.

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the role of the INSERT command in SQL DML?

To delete existing rows of data from a table

To create a new table in the database

To add new rows of data into a table

To update existing rows of data in a table

5.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Describe the UPDATE command and provide an example of its usage.

MODIFY table_name SET column1 = value1, column2 = value2 WHERE condition;

CHANGE table_name SET column1 = value1, column2 = value2 WHERE condition;

UPDATE table_name SET column1 = value1, column2 = value2 WHERE condition;

UPDATE table_name SET column1 = value1, column2 = value2 WHERE condition;

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the significance of the DELETE command in SQL DML?

It is used to remove one or more rows from a table.

It is used to retrieve data from a table

It is used to create a new table

It is used to update the data in a table

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of the SELECT statement in SQL DQL?

To insert data into a database

To delete data from a database

To update data in a database

To retrieve data from a database.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers