Search Header Logo

Understanding SQL DDL and DML

Authored by -- Shri.Ranjeetsingh Suryawanshi

Computers

Professional Development

Used 9+ times

Understanding SQL DDL and DML
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

10 sec • 1 pt

What SQL command is used to modify an existing table structure?

ALERT TABLE

CREATE TABLE

ALTER TABLE

DROP TABLE

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

How do you define a primary key in a table?

A primary key is an optional field in a table.

A primary key is used to store large text data.

A primary key is a unique identifier for a record in a table.

A primary key can be duplicated across records.

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is the purpose of a foreign key in a relational database?

To store data in a single table only.

The purpose of a foreign key is to maintain referential integrity between related tables in a relational database.

To increase the speed of data retrieval.

To create a new table in the database.

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which SQL command is used to add constraints to a table?

CREATE TABLE

SELECT * FROM

ALTER TABLE

DROP TABLE

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What happens to the data in a table when you use the TRUNCATE command?

The table structure is removed but data remains.

All data in the table is permanently removed.

The data is temporarily hidden.

Only specific rows are deleted.

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following is auto-committed?

INSERT

UPDATE

DROP

DELETE

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

How can you enforce uniqueness on a column in a table?

Use a FOREIGN KEY constraint on the column.

Add a PRIMARY KEY to the table.

Set the column to NULLABLE.

Use a UNIQUE constraint on the column.

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?