Search Header Logo

CS10337 - Lecture #5

Authored by Rafael Orta

Information Technology (IT)

University

Used 44+ times

CS10337 - Lecture #5
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of transaction locking?

To prevent unauthorized access

To ensure data integrity during concurrent access

To speed up data retrieval

To encrypt data

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct way to insert a row without specifying column names?

INSERT INTO table_name (column1, column2) VALUES (value1, value2)

INSERT INTO table_name VALUES (value1, value2)

INSERT INTO table_name SET column1 = value1, column2 = value2

INSERT INTO table_name (column1, column2) SET (value1, value2)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for using a subquery to insert one or more rows into a table?

INSERT INTO table_name VALUES (value_list)

INSERT [INTO] table_name [(column_list)] select_statement

SELECT * FROM table_name WHERE condition

UPDATE table_name SET column = value

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default mode for MySQL Workbench regarding updates?

Safe update mode

Fast update mode

Manual update mode

Automatic update mode

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What does safe update mode prevent in MySQL Workbench? (Multiple Correct Answers)

Deleting rows without a WHERE clause

Updating rows if the WHERE clause is omitted

Inserting rows without a primary key

Creating tables without a foreign key

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which SQL statement would delete a row from 'invoice_line_items' where the invoice_id is 78 and invoice_sequence is 2?

DELETE FROM invoice_line_items WHERE invoice_id = 78 AND invoice_sequence = 2

DELETE FROM invoice_line_items WHERE invoice_id = 78 OR invoice_sequence = 2

DELETE FROM invoice_line_items WHERE invoice_id = 77 AND invoice_sequence = 2

DELETE FROM invoice_line_items WHERE invoice_id = 78 AND invoice_sequence = 3

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?

UPDATE Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’

MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’

MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’

UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’

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?