
Q91
Q91 What is a LEFT JOIN in SQL?
A join that retrieves records from the left table only
A join that retrieves records from the right table only
A join that retrieves all records from the left table and matched records from the right table
A join that retrieves matched records from both tables
Q92
Q92 In SQL, what does a SELF JOIN refer to?
Joining a table with a different table
Joining a table with itself using a different alias
Joining a table with a copy of itself
Joining a table with its foreign key
Q93
Q93 What is an EQUI JOIN?
A join using an equality operator
A join using any comparison operator other than equality
A join based on the equidistant principle
A join that always produces an equal number of rows from both tables
Q94
Q94 In a RIGHT JOIN, what happens to the rows from the right table that have no matches in the left table?
They are included in the result set with NULLs in the columns of the left table
They are excluded from the result set
They are included as duplicates
They are replaced with values from the left table
Q95
Q95 How does a NON-EQUI JOIN differ from an EQUI JOIN?
NON-EQUI JOIN uses non-equality operators, EQUI JOIN uses equality operators
NON-EQUI JOIN is faster than EQUI JOIN
NON-EQUI JOIN cannot be used with WHERE clause, EQUI JOIN can
There is no difference
Q96
Q96 What needs to be corrected in "SELECT * FROM Employees INNER JOIN Departments ON Employees.DepartmentID = Departments.DepartmentID;"?
Replace 'INNER JOIN' with 'LEFT JOIN'
Change 'ON' to 'USING'
Remove 'Employees.' prefix from 'DepartmentID'
No error
Q97
Q97 Identify the error in "SELECT Employees.Name, Departments.Name FROM Employees LEFT JOIN Departments USING (DepartmentID);"
Change 'LEFT JOIN' to 'RIGHT JOIN'
Replace 'USING (DepartmentID)' with 'ON Employees.DepartmentID = Departments.DepartmentID'
Add 'AS EmployeeName, AS DepartmentName' for clarity
No error
Q98
Q98 Correct the syntax error in "SELECT * FROM Orders RIGHT OUTER JOIN Customers ON Orders.CustomerID = Customers.ID WHERE Orders.OrderDate = '2023-01-01';"
Change 'RIGHT OUTER JOIN' to 'LEFT OUTER JOIN'
Replace 'WHERE' with 'AND'
Remove 'Orders.' prefix from 'OrderDate'
No error
Q99
Q99 What is incorrect in
"SELECT A.Name, B.Name FROM Employees A, Employees B WHERE A.EmployeeID < B.EmployeeID;"?
The SELECT statement
The WHERE clause
No error, it is a SELF JOIN
The table aliases (A, B)
Q100
Q100 In "SELECT * FROM Orders FULL JOIN Customers ON Orders.CustomerID = Customers.ID;", identify the error.
Replace 'FULL JOIN' with 'FULL OUTER JOIN'
Change 'ON' to 'USING'
Add 'WHERE Orders.OrderDate IS NOT NULL'
No error
Q101
Q101 What needs to be changed in
"SELECT * FROM Orders INNER JOIN Customers ON Orders.CustomerID <> Customers.ID;"?
INNER JOIN
<> operator
No change
The ON clause
Q102
Q102 Correct the syntax error in
"SELECT * FROM Employees A LEFT JOIN Departments B ON A.DepartmentID == B.DepartmentID;"
LEFT JOIN
ON clause
No syntax error
== operator
Q103
Q103 Identify the issue in
"SELECT E.Name, D.Name FROM Employees E JOIN Departments D ON E.DepartmentID > D.DepartmentID;"
JOIN keyword
> operator
No error
The ON clause
Q104
Q104 In "SELECT * FROM Employees CROSS JOIN Departments;", what needs correction?
Change 'CROSS JOIN' to 'INNER JOIN'
Add 'ON' clause with condition
Remove 'FROM Employees'
No error
Q105
Q105 What is wrong in "SELECT * FROM Employees FULL OUTER JOIN Departments ON Employees.DepartmentID = Departments.DepartmentID WHERE Departments.DepartmentName IS NULL;"?
Replace 'FULL OUTER JOIN' with 'LEFT JOIN'
Change 'WHERE' to 'AND'
Remove 'WHERE Departments.DepartmentName IS NULL'
No error
Q106
Q106 What is the purpose of the ROUND function in SQL?
To round a number to the nearest integer
To round a number to a specified number of decimal places
To find the square root of a number
To return the value of PI
Q107
Q107 What does the CEILING function do in SQL?
Returns the smallest integer greater than or equal to a given number
Returns the largest integer less than or equal to a given number
Calculates the square of a number
Calculates the square root of a number
Q108
Q108 In SQL, what is the result of the SQRT function when applied to a negative number?
A positive number
Zero
An error
A negative number
Q109
Q109 What is the purpose of the PI function in SQL?
To return the value of PI
To calculate the perimeter of a circle
To calculate the area of a circle
To return the radius of a circle
Q110
Q110 How does the SQUARE function differ from the POWER function in SQL?
SQUARE calculates the square, POWER calculates any exponent
SQUARE and POWER are the same
SQUARE calculates the square root, POWER calculates the square
SQUARE calculates any exponent, POWER calculates the square
Q111
Q111 What needs to be corrected in "SELECT ROUND(Salary, 2) FROM Employees;"?
Change 'ROUND' to 'ROUNDDOWN'
Replace '2' with '-2'
Add 'AS RoundedSalary' for clarity
No error
Q112
Q112 Identify the error in "SELECT Name, SQRT(Age) FROM Employees WHERE Age >= 0;"
Change 'SQRT' to 'SQUARE'
Replace 'Age >= 0' with 'Age > 0'
Add 'AS SquareRootAge' for clarity
No error
Q113
Q113 Correct the syntax error in "SELECT CEILING(Price) AS RoundedPrice FROM Products WHERE Price > 0;"
Change 'CEILING' to 'FLOOR'
Replace 'AS RoundedPrice' with 'AS PriceCeiling'
Remove 'WHERE Price > 0'
No error
Q114
Q114 What is incorrect in "SELECT Name, PI() * Radius * Radius AS Area FROM Circles;"?
Replace 'PI()' with '3.14'
Change 'Radius * Radius' to 'Power(Radius, 2)'
Remove 'AS Area'
No error
Q115
Q115 In "SELECT SQUARE(Length) FROM Rectangles;", what needs correction?
Change 'SQUARE' to 'SQRT'
Replace 'Length' with 'Width'
Add 'AS SquareLength' for clarity
No error
Q116
Q116 What needs to be corrected in "SELECT CAST(Salary AS INT) FROM Employees;"?
Change 'INT' to 'INTEGER'
Replace 'CAST' with 'CONVERT'
Add 'AS IntegerSalary' for clarity
No error
Q117
Q117 Identify the error in "SELECT CONVERT(VARCHAR, StartDate, 103) FROM Projects WHERE StartDate IS NOT NULL;"
Change 'VARCHAR' to 'DATE'
Replace '103' with '101'
Remove 'WHERE StartDate IS NOT NULL'
No error
Q118
Q118 Correct the syntax error in "SELECT Name, TRY_CONVERT(INT, Age) AS IntegerAge FROM Employees WHERE Age IS NOT NULL;"
Change 'TRY_CONVERT' to 'CONVERT'
Replace 'INT' with 'INTEGER'
Remove 'WHERE Age IS NOT NULL'
No error
Q119
Q119 What does the COALESCE function do in SQL?
Returns the first non-null value in a list
Combines multiple rows into a single string
Duplicates a string
Compares two expressions and returns NULL if they are equal
Q120
Q120 What needs to be corrected in "SELECT COALESCE(Salary, 0) FROM Employees;"?
Change 'COALESCE' to 'NVL'
Replace '0' with '10000'
Add 'AS DefaultSalary' for clarity
No error