0
0
DBMS Theoryknowledge~10 mins

DML (INSERT, UPDATE, DELETE) in DBMS Theory - Interactive Code Practice

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

Complete the code to insert a new record into the table.

DBMS Theory
INSERT INTO employees (name, age) VALUES ([1], 30);
Drag options to blanks, or click blank then click option'
A'John'
Bname
C"John"
DJohn
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to use quotes around text values.
Using double quotes instead of single quotes.
2fill in blank
medium

Complete the code to update the age of an employee named 'Alice'.

DBMS Theory
UPDATE employees SET age = 35 WHERE name = [1];
Drag options to blanks, or click blank then click option'
A"Alice"
B'Alice'
CAlice
Dname
Attempts:
3 left
💡 Hint
Common Mistakes
Using the column name instead of the string value.
Using double quotes instead of single quotes.
3fill in blank
hard

Fix the error in the DELETE statement to remove employees older than 60.

DBMS Theory
DELETE FROM employees WHERE age [1] 60;
Drag options to blanks, or click blank then click option'
A<
B=
C!=
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '=' which deletes only employees exactly 60 years old.
Using '<' which deletes employees younger than 60.
4fill in blank
hard

Fill both blanks to update the salary of employees in the 'Sales' department to 50000.

DBMS Theory
UPDATE employees SET salary = [1] WHERE department [2] 'Sales';
Drag options to blanks, or click blank then click option'
A50000
BMarketing
C=
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>' instead of '=' in the WHERE clause.
Putting quotes around the number 50000.
5fill in blank
hard

Fill all three blanks to insert a new employee with name 'Emma', age 28, and department 'HR'.

DBMS Theory
INSERT INTO employees (name, age, department) VALUES ([1], [2], [3]);
Drag options to blanks, or click blank then click option'
A'Emma'
B28
C'HR'
DEmma
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around text values.
Putting quotes around numbers.