SQL Group Functions and Database Operations
Test your knowledge of SQL aggregate functions, DML statements, and Oracle database operations including transactions, MERGE, and data modification.
Questions
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
In an Oracle Database, Locks are critical
- 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
You can update more than 1 row in a table with one update syntax
- 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
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
In an Oracle Database, Locks are critical
- True
- False
Which is not a group function?
- Count
- Avg
- Total
- Max