SQL Group Functions and Database Operations
Test your knowledge of SQL group functions, DML statements, database transactions, and join operations in Oracle Database
Questions
When is a Cartesian product formed?
- When a join condition is omitted.
- When a join condition is invalid.
- All rows in the first table are joined to all rows in the second table.
- All of the above.
A Non equi-join is a join condition that does not contain an equality operator.
- True
- False
SYSDATE is a date function that returns the current database server date and time.
- True
- False
Which keyword used in DML statements prohibits you from changing rows that are not in the sub-query?
- CHECK keyword
- WITH CHECK keyword
- WITH CHECK OPTION keyword
- None of the Above
Explicit Defaults can be used in
- INSERT statement
- UPDATE statement
- Both of the Above
- None of the Above
MERGE statement
- Avoids separate updates
- ncreases performance and ease of use
- Is useful in data warehousing applications
- All of the above
Database transactions end with
- COMMIT or ROLLBACK
- A DDL or DCL statement executing
- USER exiting iSQL*Plus or System crash
- Any one of the above
You can update more than 1 row in a table with one update syntax
- True
- False
Which is not a group function?
- Count
- Avg
- Total
- Max
You can use Avg or Sum group functions for any numeric data
- True
- False
COUNT(DISTINCT expr) returns
- No. of rows in a table
- No. of rows with non-null values of the expr
- No. of distinct non-null values of the expr
- None of the above
Which function forces group functions to include null values?
- Group By
- NVL
- Order By
- Having
All columns in the SELECT list, that are not there in the GROUP function, should be in the Group By clause
- True
- False
Which is the clause used to restrict groups?
- HAVING
- WHERE
- Order By
- Group by
We can use Group functions in the WHERE clause
- True
- False
We can use MIN and MAX for any
- Numeric data
- Data type
- Char data
- None of the Above
We can nest Group Functions
- True
- False
Delete from Employee where grade = ‘Y’” deletes
- All rows of the Employee table
- Rows of the Employee table where the set grade is ‘Y’
- Delete 1 row
- Nothing will be deleted
In an Oracle Database, Locks are critical
- True
- False
Character values are case insensitive
- True
- False