Question 290 of 1,446
PCDE Migrate data solutions Practice Question
An organization is migrating an Oracle database to Cloud SQL for PostgreSQL using Ora2Pg. During testing, a stored procedure that uses Oracle's SYSDATE produces incorrect results. What is the correct approach to handle this conversion?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Replace SYSDATE with CURRENT_TIMESTAMP.
Oracle's SYSDATE returns date and time; PostgreSQL equivalent is CURRENT_TIMESTAMP (or NOW()). Simply mapping to CURRENT_DATE would lose time component, breaking logic.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Replace SYSDATE with LOCALTIMESTAMP.
Why it's wrong here
LOCALTIMESTAMP returns timestamp without time zone; SYSDATE includes time zone information.
- ✗
Use TO_DATE(SYSDATE, 'YYYY-MM-DD HH24:MI:SS') to convert the value.
Why it's wrong here
SYSDATE is not a valid function in PostgreSQL; this would cause an error.
- ✓
Replace SYSDATE with CURRENT_TIMESTAMP.
Why this is correct
CURRENT_TIMESTAMP returns date and time with time zone, equivalent to Oracle's SYSDATE.
- ✗
Replace SYSDATE with CURRENT_DATE in the converted procedure.
Why it's wrong here
CURRENT_DATE returns only the date, not time, leading to incorrect results.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jul 4, 2026
This PCDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCDE exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.