An SQL statement

Just temme an SQL st.

where we have to find all the strings like "39house" and after that we have to replace "39house" with "39 house"

Comments

  • : Just temme an SQL st.
    :
    : where we have to find all the strings like "39house" and after that we have to replace "39house" with "39 house"
    :
    :

    Could you clear your question.
  • : Just temme an SQL st.
    :
    : where we have to find all the strings like "39house" and after that we have to replace "39house" with "39 house"
    :
    :

    Is this what you're looking for Mate?

    SELECT *
    FROM schema.tablename
    WHERE table.column LIKE '39house';

    OR

    SELECT *
    FROM schema.tablename
    WHERE table.column LIKE '%39house%';

    AND

    UPDATE schema.tablename
    SET table.column = '39 house'
    WHERE table.column LIKE '39house';

    OR

    UPDATE schema.tablename
    SET table.column = '39 house'
    WHERE table.column LIKE '%39house%';

    Use the required one depending if you're searching for '39house' specifically or any character string containing '39house'.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories