0
0
SQLquery~10 mins

UPDATE multiple columns in SQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to update the salary column to 5000.

SQL
UPDATE employees SET salary = [1] WHERE id = 3;
Drag options to blanks, or click blank then click option'
Asalary
B'5000'
C5000
DNULL
Attempts:
3 left
💡 Hint
Common Mistakes
Putting quotes around numbers causing type errors.
Using column name instead of a value.
2fill in blank
medium

Complete the code to update the name column to 'Alice'.

SQL
UPDATE employees SET name = [1] WHERE id = 1;
Drag options to blanks, or click blank then click option'
A'Alice'
BAlice
C"Alice"
Dname
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around string values.
Using double quotes instead of single quotes.
3fill in blank
hard

Fix the error in the code to update both name and salary columns.

SQL
UPDATE employees SET name = 'Bob', salary = [1] WHERE id = 2;
Drag options to blanks, or click blank then click option'
ANULL
B6000
Csalary
D'6000'
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around numeric values causing errors.
Using column names instead of values.
4fill in blank
hard

Fill both blanks to update name to 'Carol' and salary to 7000.

SQL
UPDATE employees SET name = [1], salary = [2] WHERE id = 4;
Drag options to blanks, or click blank then click option'
A'Carol'
B7000
C'7000'
DCarol
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around numbers.
Forgetting quotes around strings.
5fill in blank
hard

Fill all three blanks to update name to 'Dave', salary to 8000, and department to 'Sales'.

SQL
UPDATE employees SET name = [1], salary = [2], department = [3] WHERE id = 5;
Drag options to blanks, or click blank then click option'
A'Dave'
B8000
C'Sales'
DSales
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around numbers.
Forgetting quotes around strings.
Using unquoted strings causing syntax errors.