Question 21
EasyWhat does the * mean in SELECT * FROM students?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
What does the * mean in SELECT * FROM students?
Select all databases
Multiply the columns
Select only the first row
Select all columns
Sign up free to see the answer and a step-by-step explanation.
Which operator checks whether a value lies within a range, such as marks from 60 to 80?
EXISTS
BETWEEN
IN
LIKE
Sign up free to see the answer and a step-by-step explanation.
Which operator checks whether a value matches any value in a list, such as city ___ ('Pune', 'Delhi')?
BETWEEN
LIKE
IN
ANY OF
Sign up free to see the answer and a step-by-step explanation.
Which join returns only the rows that have matching values in both tables?
LEFT JOIN
CROSS JOIN
INNER JOIN
FULL OUTER JOIN
Sign up free to see the answer and a step-by-step explanation.
If ORDER BY is used without ASC or DESC, in what order are the rows sorted?
Random
Ascending
Insertion order
Descending
Sign up free to see the answer and a step-by-step explanation.
Which statement adds a new column to an existing table?
ALTER TABLE … ADD …
INSERT COLUMN …
CREATE COLUMN …
UPDATE TABLE … ADD …
Sign up free to see the answer and a step-by-step explanation.
In a LIKE pattern, what does the underscore _ match?
Exactly one character
Any number of characters
Only digits
A space only
Sign up free to see the answer and a step-by-step explanation.
Table employee:
| id | name | dept | salary |
|---|---|---|---|
| 1 | Asha | HR | 40000 |
| 2 | Ravi | IT | 60000 |
| 3 | Meena | IT | 75000 |
| 4 | John | Sales | 50000 |
| 5 | Priya | IT | 60000 |
| 6 | Karan | Sales | NULL |
What does this query return?
SELECT COUNT(salary) FROM employee;
6
57000
Sign up free to see the answer and a step-by-step explanation.
Table employee:
| id | name | dept | salary |
|---|---|---|---|
| 1 | Asha | HR | 40000 |
| 2 | Ravi | IT | 60000 |
| 3 | Meena | IT | 75000 |
| 4 | John | Sales | 50000 |
| 5 | Priya | IT | 60000 |
| 6 | Karan | Sales | NULL |
What value does this query return?
SELECT AVG(salary) FROM employee;
47500
285000
Sign up free to see the answer and a step-by-step explanation.
Table employee:
| id | name | dept | salary |
|---|---|---|---|
| 1 | Asha | HR | 40000 |
| 2 | Ravi | IT | 60000 |
| 3 | Meena | IT | 75000 |
| 4 | John | Sales | 50000 |
| 5 | Priya | IT | 60000 |
| 6 | Karan | Sales | NULL |
Which departments does this query list?
SELECT dept FROM employee
GROUP BY dept
HAVING COUNT(*) > 2;
HR, IT and Sales
IT and Sales
Sign up free to see the answer and a step-by-step explanation.
5
285000
60000
57000
None
IT only