Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

89. Database - SQL Insert, Update, Delete Quiz

Total questions: 1

Worksheet time: 7mins

Name
Class
Date
1-10.
1.

What keyword is used to insert data into a table in SQL?

a)

add

b)

insert

c)

update

d)

select

2.

What keyword is used to update information in a table in SQL?

a)

modify

b)

change

c)

set

d)

update

3.

What keyword is used to delete records from a table in SQL?

a)

remove

b)

erase

c)

delete

d)

clear

4.

When inserting data into a table, what keyword is used to specify the values being inserted?

a)

input

b)

values

c)

set

d)

define

5.

In SQL, what keyword is used to specify the condition for updating or deleting records?

a)

where

b)

if

c)

condition

d)

check

6.

What is the correct SQL command to add a new record to the 'world' table with the given information: name of the country - ours, capital - Emerald City, population - 1 million?

a)

add to world values ('ours', 'Emerald City', 1 million')

b)

insert into world ('ours', 'Emerald City', 1 million')

c)

add record to world ('ours', 'Emerald City', 1 million')

d)

insert into world values ('ours', 'Emerald City', 1 million')

7.

What is the correct SQL command to update the population to 2 million and the name to Wonderland for any country with the capital of Emerald City?

a)

update world set population = 2 million, name = Wonderland where capital = Emerald City

b)

update world set population = '2 million', name = 'Wonderland' where capital = 'Emerald City'

c)

update world set population = 2 million, name = 'Wonderland' where capital = 'Emerald City'

d)

update world set population = '2 million', name = 'Wonderland' where capital = 'Emerald City'

8.

What is the correct SQL command to remove all records from the 'world' table if they have a population larger than 2 million?

a)

remove from world where population > 2 million

b)

erase from world where population > 2 million

c)

clear from world where population > 2 million

d)

delete from world where population > 2 million

9.

When inserting data into a table, what needs to be done if the list of fields is omitted?

a)

Specify the table name again

b)

No need to provide any values

c)

Make sure to provide all the appropriate values for a complete record

d)

Omit the values as well

10.

What is the correct SQL command to update the population to 2 million and the name to Wonderland for any country with the capital of Emerald City?

a)

update world set population = 2 million, name = 'Wonderland' where capital = 'Emerald City'

b)

update world set population = '2 million', name = 'Wonderland' where capital = 'Emerald City'

c)

update world set population = 2 million, name = Wonderland where capital = Emerald City

d)

update world set population = '2 million', name = 'Wonderland' where capital = 'Emerald City'