SQL Fundamentals & Data Manipulation Flashcards
7 cards from real 1Z0-006 practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 SQL Fundamentals & Data Manipulation flashcards as text
Which SQL statement is used to permanently save changes made during a transaction?
Answer: COMMIT
COMMIT permanently writes all pending DML changes to the database, making them visible to other sessions.
Which SQL function concatenates two strings in Oracle?
Answer: CONCAT(str1, str2) or str1 || str2
Oracle supports both the CONCAT function and the || pipe operator to join strings together.
What does SELECT * FROM employees WHERE last_name LIKE '_a%'; return?
Answer: Rows where the second character of last_name is 'a'
The underscore (_) wildcard matches exactly one character, so _a% matches any name whose second character is 'a'.
Which aggregate function returns the largest value in a column?
Answer: MAX(column)
MAX(column) is the standard SQL aggregate function that returns the highest value in a group.
A subquery in a WHERE clause that returns exactly one value is called a:
Answer: Single-row subquery
A single-row subquery returns one row and one column, and is used with single-row comparison operators like =, >, <.
Which DML statement is used to change existing data in a table?
Answer: UPDATE
UPDATE is the DML command used to modify existing row values; ALTER is DDL used to change table structure.
What is the effect of adding NOT NULL to a column definition in a CREATE TABLE statement?
Answer: The column cannot store a NULL value; every row must supply a value
NOT NULL is a column-level constraint that forces every inserted or updated row to supply a non-NULL value for that column.