0
0
DBMS Theoryknowledge~10 mins

Selection operation 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 select all columns from the table named 'employees'.

DBMS Theory
SELECT [1] FROM employees;
Drag options to blanks, or click blank then click option'
AALL_COLUMNS
B*
CANY
DALL
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ALL' instead of '*'
Using 'ANY' which is not valid here
Using 'ALL_COLUMNS' which is not a SQL keyword
2fill in blank
medium

Complete the code to select rows where the 'age' column is greater than 30.

DBMS Theory
SELECT * FROM employees WHERE age [1] 30;
Drag options to blanks, or click blank then click option'
A=
B<=
C<
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '=' which selects only equal values
Using '<' which selects smaller values
Using '<=' which includes smaller or equal values
3fill in blank
hard

Fix the error in the code to select employees with the last name 'Smith'.

DBMS Theory
SELECT * FROM employees WHERE last_name [1] 'Smith';
Drag options to blanks, or click blank then click option'
A=
BLIKE
C==
DIS
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' which is invalid in SQL
Using 'LIKE' without wildcards for exact match
Using 'IS' which is for NULL comparisons
4fill in blank
hard

Fill both blanks to select employees with salary greater than 50000.

DBMS Theory
SELECT * FROM employees WHERE salary [1] [2];
Drag options to blanks, or click blank then click option'
A>
B50000
C40000
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' instead of '>'
Using 40000 instead of 50000
Swapping the blanks
5fill in blank
hard

Fill all three blanks to select employees with age less than 40 and department 'Sales'.

DBMS Theory
SELECT * FROM employees WHERE age [1] [2] AND department [3] 'Sales';
Drag options to blanks, or click blank then click option'
A<
B40
C=
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>' instead of '<' for age
Using wrong age number
Using 'LIKE' instead of '=' for department