1.

Based on the following tables, what is the output of the SQL query:

Table: STUDENT

ID NAME
01 Ben
02 Bob
03 Mike
04 Alice

Based on the following tables, what is the output of the SQL query:

Table: STUDENT

ID NAME
01 Ben
02 Bob
03 Mike
04 Alice

Table: TEACHER

ID NAME
01 Lisa
05 Mary
03 John
06 Paul
 
SQL > SELECT ID FROM STUDENT EXCEPT SELECT ID FROM TEACHERS;
2.

Which SQL join will return the shaded area in the following diagram:


 
 

enter image description here

3.

What is the output of the following SQL query:


 
 
SQL > SELECT ABS(-20) “ABSOLUTE” FROM DUAL;
4.

What is the output of the following SQL query:


 
 
SQL > SELECT CEIL(13.15) FROM DUAL;
5.

What does the following SQL query do:

CUSTOMER

ID LNAME FNAME WEBSITE
3000 Smith Alice Amazon
5000 Jones Bob Apple
6000 Johnson Ben Microsoft
7000 White Mike Apple
8000 Green Tara NULL
9000 Davis Lisa Amazon
 
SQL > DELETE FROM CUSTOMER WHERE ID<>4000;
6.

Based on the following table, what is the output of the SQL query:

CUSTOMER

ID LNAME FNAME WEBSITE
6000 Johnson Alice Amazon
5000 Jones Bob Apple
4000 Johnson Ben Microsoft
7000 White Mike Apple
8000 Green Tara NULL
9000 Davis Lisa Amazon
 
SQL > SELECT FNAME FROM CUSTOMER WHERE LNAME = ‘Johnson ' AND ID = 6000 ORDER BY FNAME;
7.

Which of the following statements about SQL is true?


 
 
SQL > TRUNCATE TABLE STUDENT;
OR SQL > DELETE FROM STUDENT;

 
 

  1. Both the queries perform the same task



  2.  
  3. Both the queries work differently



  4.  
  5. We can rollback delete but cannot rollback truncate



  6.  
  7. We cannot rollback delete but can rollback truncate




  8.  
  9.  


  10.  
8.

Based on the following table, what is the output of the SQL query:

Table: CUSTOMER

ID LNAME FNAME WEBSITE
6000 Smith Alice Amazon
5000 Jones Bob Apple
6000 Johnson Ben Cisco
7000 White Mike Apple
8000 Green Tara NULL
9000 Williams Anita Amazon
SQL > SELECT FNAME FROM CUSTOMER WHERE WEBSITE = 'Amazon'
AND ID > 6000 ORDER BY LNAME;
9.

Based on the following table, what is the output of the SQL query:

STUDENT

ID NAME AGE
01 John 20
02 Bob 18
03 Robert 25
04 Lisa NULL
 
SQL > SELECT NAME FROM STUDENT WHERE NAME LIKE '_o_' ORDER BY NAME;
10.
In an SQL Server, the SalesList and OrdersList table comprises the details of the products that have been sold and the details of all the orders received by the company respectively. The two tables are combined such that each row from one table is joined to the row of the other table. Which of the following commands is used to display a report combining the SalesLists and OrdersLists table?