Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SQL Commands - UPDATE Statements

Total questions: 10

Worksheet time: 6mins

Name
Class
Date
1.

Order the following Images to create a valid UPDATE statement

a)

1, 2, 3

b)

2, 3, 1

c)

3, 2, 1

d)

3, 1, 2

2.

What is ABC the name of?

UPDATE ABC

SET C1 = “V”

WHERE C2 = “V”

a)

The Database

b)

The User

c)

The Table

d)

The Columns

3.

What do C1 and C2 represent?

UPDATE ABC

SET C1 = “V”

WHERE C2 = “V”

a)

The Database

b)

The User

c)

The Table

d)

The Columns

4.

What is the purpose of line as indicated?

UPDATE ABC

SET C1 = “V” <-

WHERE C1 = “V”

a)

To specify what Column to Update

b)

To specify what Row to Update

c)

To specify what Table to Update

d)

To specify what Database to Update

5.

What is the purpose of line as indicated?

UPDATE ABC

SET C1 = “V”

WHERE C1 = “V” <-

a)

To specify what Column to Update

b)

To specify what Row to Update

c)

To specify what Table to Update

d)

To specify what Database to Update

6.

Given the following Table, what will the SELECT statement retrieve after both SQL statements are run?

UPDATE Contacts SET Email = 'james2@home.com'

SELECT Phone FROM Contacts WHERE Name = 'Jane'

7.

Which line in the following Statement has an error

1. UPDATE Contacts

2. SET Emial = 'james2@home.com'

3. WHERE Name = 'Jane'

a)

1

b)

2

c)

3

8.

The table has been renamed from "Contacts" to "Phonebook".

Which line needs to change?

1. UPDATE Contacts

2. SET Phone = '12345678'

3. WHERE Name = 'Jane'

a)

1

b)

2

c)

3

9.

Write the new updated line

(a)  

SET Phone = '12345678'

WHERE Name = 'Jane'

10.

How do I modify SET clause in the update statement to also update Jane's email?

UPDATE Phonebook

SET Phone = '12345678' <-

WHERE Name = 'Jane'

a)

SET

Email = 'email'; Phone = 'number'

b)

SET

Phone = 'number' + Email = 'email'

c)

SET

Email = 'email', Phone = 'number'