In Oracle, which function returns the current date and time of the database server?
✓ Correct answer: SYSDATE
Full explanation
In Oracle the SYSDATE function returns the current date and time of the database server.
9 practice MCQs on this page Page 4 of 4
Tap an option to check your answer — the correct answer and full explanation appear after you choose.
✓ Correct answer: SYSDATE
In Oracle the SYSDATE function returns the current date and time of the database server.
✓ Correct answer: Replace a NULL value with a given value
In Oracle the NVL function is used to replace a NULL value with a given value, so NVL(salary, 0) gives 0 when salary is NULL.
✓ Correct answer: Generate unique numbers automatically
In Oracle a sequence is used to generate unique numbers automatically, often for primary key values with NEXTVAL.
✓ Correct answer: VARCHAR2
In Oracle the VARCHAR2 data type is used for variable-length character strings, such as names and addresses.
✓ Correct answer: Numeric values
In Oracle the NUMBER data type is used to store numeric values, including integers and decimals.
✓ Correct answer: ON
The ON clause joins tables by matching values in a specified column, as in JOIN ... ON employees.dept_id = departments.id.
✓ Correct answer: Keeps duplicate rows
UNION ALL keeps duplicate rows when combining two query results, while UNION removes them.
✓ Correct answer: Convert a date or number to text
In Oracle the TO_CHAR function is used to convert a date or number to text, for example formatting a date as DD-MON-YYYY.
✓ Correct answer: CREATE TABLE students (id NUMBER PRIMARY KEY, name VARCHAR2(50))
The statement CREATE TABLE students (id NUMBER PRIMARY KEY, name VARCHAR2(50)) creates a table with a primary key on the id column.