Worksheets89. Database - SQL Insert, Update, Delete Quiz
Total questions: 1
Worksheet time: 7mins
What keyword is used to insert data into a table in SQL?
add
insert
update
select
What keyword is used to update information in a table in SQL?
modify
change
set
update
What keyword is used to delete records from a table in SQL?
remove
erase
delete
clear
When inserting data into a table, what keyword is used to specify the values being inserted?
input
values
set
define
In SQL, what keyword is used to specify the condition for updating or deleting records?
where
if
condition
check
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?
add to world values ('ours', 'Emerald City', 1 million')
insert into world ('ours', 'Emerald City', 1 million')
add record to world ('ours', 'Emerald City', 1 million')
insert into world values ('ours', 'Emerald City', 1 million')
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?
update world set population = 2 million, name = Wonderland where capital = Emerald City
update world set population = '2 million', name = 'Wonderland' where capital = 'Emerald City'
update world set population = 2 million, name = 'Wonderland' where capital = 'Emerald City'
update world set population = '2 million', name = 'Wonderland' where capital = 'Emerald City'
What is the correct SQL command to remove all records from the 'world' table if they have a population larger than 2 million?
remove from world where population > 2 million
erase from world where population > 2 million
clear from world where population > 2 million
delete from world where population > 2 million
When inserting data into a table, what needs to be done if the list of fields is omitted?
Specify the table name again
No need to provide any values
Make sure to provide all the appropriate values for a complete record
Omit the values as well
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?
update world set population = 2 million, name = 'Wonderland' where capital = 'Emerald City'
update world set population = '2 million', name = 'Wonderland' where capital = 'Emerald City'
update world set population = 2 million, name = Wonderland where capital = Emerald City
update world set population = '2 million', name = 'Wonderland' where capital = 'Emerald City'
