Courseiva

DA0-002 Data Acquisition and Preparation Practice Question

A data analyst wants to combine first_name and last_name columns into a single full_name column in a SQL query. Which string function should be used?

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

✓

CONCAT()

CONCAT() joins two or more strings together.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    CONCAT()

    Why this is correct

    CONCAT() joins two or more string values into one, directly satisfying the requirement to merge first_name and last_name into a full_name column. Unlike the concatenation operator, it handles NULL inputs by treating them as empty strings, avoiding a NULL result when either name column is missing.

  • ✗

    UPPER()

    Why it's wrong here

    UPPER() converts characters in one string to uppercase; it returns a single transformed value and cannot join two columns. It is tempting because it is a common string function applied to name data, and would be correct when the requirement is to normalise casing, such as displaying a surname in capitals.

  • ✗

    LENGTH()

    Why it's wrong here

    LENGTH() returns the character count of a single string, so it cannot join first_name and last_name. It is tempting because it is a genuine string function, and it would be correct for validating field sizes or filtering rows by name length, but concatenation requires CONCAT() or the || operator.

  • ✗

    SUBSTRING()

    Why it's wrong here

    SUBSTRING() extracts a portion of one string using start and length positions; it cannot concatenate two columns. It is tempting because it manipulates string data and would be correct when the requirement is to pull a fixed segment, such as the first three characters of a code, from a single column.

About these practice questions

This DA0-002 question is part of Courseiva's 1,004-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DA0-002 practice question is part of Courseiva's free CompTIA 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 DA0-002 exam.