STRUCTURED QUERY LANGUAGE TEST

Progress

1.

What is the full form of SQL?

2.

In SQL, which command is used to change a table's storage characteristics?

3.

Which one is a non-relational database?

4.

Which of the following is not a database object?

5.

 What does a  DML Stand for?

6.

Can you validate the statement?

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

True or False?

7.

Find all the cities whose humidity is 89

8.

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

9.

Which one is not used in SQL?

10.

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;

11.

What is the significance of “ORDER BY” in the following MySQL statement?

SELECT emp_id, fname, lname  
FROM person    
ORDER BY emp_id;  

12.

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;

13.

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

14.

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    

15.

Which syntax is used for Drop Index (idx_pname) from the Person table in MYSQL?

16.

How to create index idx_pname for multiple columns (Lastname, Firstname) in a Person table?

17.

Which of the SQL statement is correct?

18.

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

19.

If you don't specify ASC or DESC after a SQL ORDER BY clause, the following is used by default

20.

The HAVING clause does which of the following?

21.

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

22.

You can delete a view with _____________ Command.

23.

Select ________ dept_name from instructor; 

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

24.

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?

25.

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

26.

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

27.

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

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

28.

 Syntax for create a  views is _______

29.

What is the meaning of the “HAVING” clause in MySQL?

30.

The SQL WHERE clause used for 

31.

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

32.

Can you validate the statement?

An ORDER BY can be used in a subquery.

True or False?

33.

Which of the following statement(s) is TRUE regarding subqueries?

34.

Can you validate the statement?

A subquery can be used anywhere an expression is allowed.

True or False?

35.

A subquery in an SQL SELECT statement is enclosed in

36.

Can you validate the statement?

A column with a Primary key has a Null value.

True or False?

37.

Which of the following is not a Key in SQL Server?

38.

Student (ID, Name, Dept_name, Total_credit)

In this above query which attribute form the Primary Key?

39.

Can you validate the statement?

A column with a Unique key has duplicate values.

True or False?

40.

How many types of indexes are there in the SQL server?

41.

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

 

42.

What is the syntax for joining two tables? Pick Two

43.

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

44.

How many tables may include with a join? 

45.

List all orders, showing order number, customer name and credit limit of a customer.

Orders Table:  
Order_Number, Customer, Product_Amount
Customers Table:  
Customer_Number, Customer_Name, Credit_Limit

 Which of the below query satisfy the above question?

46.

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

47.

What is the function of Full Outer Join in SQL?

48.

Choose the query that matches the above image.

49.

Which type of join is not desirable for retrieval?

50.

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

51.

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

 

52.

Which of the following is incorrect SQL?

53.

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

 

54.

The SQL Statement

SELECT ROUND(45.926, -1) FROM DUAL;

55.

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

 

56.

“COUNT” keyword belongs to which categories in MySQL?

57.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT Count(Salary) from Salesemployee 
where name Like 'T%';  

 

58.

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';      
        

59.

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

 

60.

What values does the count(*) function ignore?

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