Search Header Logo

Tesco DDL and DML

Authored by Ivy Professional School

Professional Development

Professional Development

Tesco DDL and DML
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

OPEN ENDED QUESTION

2 mins • 1 pt

E mail

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

2 mins • 1 pt

Full Name

Evaluate responses using AI:

OFF

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What is the correct way to rename a table in SQL?

MODIFY TABLE old_name TO new_name;

RENAME TABLE old_name TO new_name;

ALTER TABLE old_name TO new_name;

CHANGE TABLE old_name TO new_name;

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What is the key difference between TRUNCATE TABLE Products; and DELETE FROM Products;?

TRUNCATE removes only some records, while DELETE removes all records.

TRUNCATE deletes all records without logging each row deletion, while DELETE logs each deletion.

DELETE removes table structure and records, while TRUNCATE keeps both

Both work the same way

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Will the following SQL query execute successfully or cause an error?
CREATE TABLE Customers ( CustomerID INT PRIMARY KEY, CustomerName VARCHAR(100));

INSERT INTO Customers (CustomerID, CustomerName) VALUES (101, 'John Doe');
INSERT INTO Customers (CustomerID, CustomerName) VALUES (101, 'John Doe');

The query will run successfully, inserting both records.

The query will fail because CustomerID is a PRIMARY KEY and must be unique.

The query will run, but only one record will be inserted automatically.

The query will throw an error because INSERT cannot be used twice on the same table.

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What is the correct syntax to delete a record from the Orders table where OrderID is 102?

REMOVE FROM Orders WHERE OrderID = 102;

DELETE FROM Orders WHERE OrderID = 102;

DROP Orders WHERE OrderID = 102;

ERASE FROM Orders WHERE OrderID = 102;

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which statement is true about the ALTER TABLE command?

ALTER TABLE can be used to delete records from a table.

ALTER TABLE is used to modify an existing table’s structure.

ALTER TABLE is used to delete an entire table permanently.

ALTER TABLE can rename a column but not a table.

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?