STRUCTURED QUERY LANGUAGE TEST

Progress

1.

Which of the following database cannot be dropped?

2.

Which file type is used for database backup?

3.

What is the main language of  Transact-SQL?

4.

Which of the following is not a database object?

5.

The result of a SQL SELECT statement is a ______.

6.

Select ________ dept_name from instructor; 

Here which of the following displays the unique values of the column?

7.

Find the name of these cities with temperature and condition whose condition is neither sunny nor cloudy

8.

If emp_id contains the following set {-1, -2, 2, 3, -3, 1}, what will be the output on the execution of the following MySQL statement?

SELECT emp_id
FROM person
ORDER BY emp_id;

9.

Find the names of the countries whose condition is sunny

10.

Select two options which do not belong to the Purpose of Delete

11.

Select ID, name, dept name, salary * 1.1 where instructor;

The query given below will not give an error. Which one of the following has to be replaced to get the desired output?

12.

Which SQL keyword is used to sort the result-set?

13.

What is the significance of the statement “GROUP BY d.name” in the following MySQL statement?

SELECT d.name, COUNT (emp_id) emp_no  
FROM department d INNER JOIN Employee e
ON d.dept_id=e.emp_id    
GROUP BY d.name    

14.

What is the meaning of the “ORDER BY” clause in MySQL?

15.

We can use one table to create another table using the below query. True or False ?

CREATE TABLE TestTable AS

SELECT customername, contactname

FROM customers;

16.

Which SQL Query is used for updating the ContactName in the Customers table?

17.

What can be the condition in the "WHERE" clause in a SQL query?

18.

 Syntax for create a  views is _______

19.

How to delete the Customer name of Alfreds Futterkiste (CustomerID is 1) from the Customers table?

20.

Which command is used to change the definition of a table in SQL ?

21.

Which of the SQL statement is correct?

22.

Which of the following query is correct for selecting the name of the staff from ''staffinfo'' table where salary is 10000 or 25000?

23.

What is the significance of the statement “HAVING COUNT (emp_id)>2” in the following MySQL statement?

SELECT d.name, COUNT (emp_id) emp_no  
FROM department d INNER JOIN Employee e  
ON d.dept_id=e.emp_id      
GROUP BY d.name      
HAVING COUNT (emp_id)>2    

24.

With SQL, how do you select all the records from a table named "Persons" where the value of the column "Firstname" ends with an ''a''?

25.

The _______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predicate.

26.

Can you validate the statement?

"ORDER BY" can only be used by WHERE Clause.

True or False?

27.

The HAVING clause does which of the following?

28.

Select ID, GPA from student grades order by GPA ____________.

In order to give only 10 ranks, on the whole, we should use.

29.

Analyse the following Query and Mark the answer whether it's the correct query or not?

SELECT Name, Age, Firstname, Lastname
FROM EMPLOYEE     
GROUP BY NAME, SALARY;  

30.

Find all the cities whose humidity is 89

31.

Which of the following multi-row operators can be used with a sub-query?

32.

Which of the following is true about sub-queries?

33.

A subquery in an SQL SELECT statement is enclosed in

34.

Can you validate the statement?

An ORDER BY can be used in a subquery.

True or False?

35.

What is "Subquery"?

36.

By default, which key creates Clustered index?

37.

How many Primary Keys can have in a table?

38.

Can you validate the statement?

A column with a Primary key has a Null value.

True or False?

39.

Which of the following is correct DROP INDEX Command?

40.

Student (ID, Name, Dept_name, Total_credit)

In this above query which attribute form the Primary Key?

41.

 In which two cases would you use an outer join? (Choose two.)

42.

How many tables may include with a join? 

43.

What are the joins available in SQL?

44.

Can you validate the statement?

Alias is used in Joins.

True or False?

45.

Choose the query that matches the above image.

46.

Analyze the following tables and output and choose the correct query to achieve the output.

47.

Analyze the following tables and output and choose the correct query to achieve the output.

48.

Where are Joins used?

49.

Which type of join is not desirable for retrieval?

50.

In the absence of WHERE condition this JOIN will function like a _______.

51.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT Count(*) from Salesemployee 
WHERE Salary >=500 and Dept = 'Marketing';

 

52.

Use below table (Salesemployee)  and answer the following question

What is the output of the following query?

SELECT SUM(Salary) from Salesemployee     
WHERE Gender = 'Male';      
        

53.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT Count(*) from Salesemployee 
WHERE Gender = 'Male';  

 

54.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT Count(*) from Salesemployee 
WHERE Salary >=500 and Dept = 'Sales';

 

55.

“COUNT” keyword belongs to which categories in MySQL?

56.

The SQL Statement

SELECT ROUND(45.926, -1) FROM DUAL;

57.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT AVG(Salary) from Salesemployee 
where Dept = ' HR';    

 

58.

Use below table (Salesemployee) and answer the following question
What is the output of following query?
SELECT MIN(Salary) from Salesemployee 
WHERE Gender = 'Female';  

 

59.

Which SQL keyword is used to retrieve the highest value? 

60.

Which of the following is incorrect SQL?

Assessment complete! Thank you for you time.
We are redirecting you to the result page, Please click on 'SUBMIT'