Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8991631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:46:25+00:00 2026-06-15T22:46:25+00:00

Is it possible to delete certain text from database which is not static? For

  • 0

Is it possible to delete certain “text” from database which is not static?
For static text I simply replaced “static text” with “”.
Actually I just need a command which will delete “static text1 * static text2”
So everything from text1 to text2.
Text1 and text2 is static, but everything between changes.

Thanks for help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:46:26+00:00Added an answer on June 15, 2026 at 10:46 pm

    If I understand correctly, you want to UPDATE a text-value in a table to remove any text that’s between text1 and text2, but leave the actual row in-tact.

    If that’s the case, you can use a combination of SUBSTRING() and LOCATE() to perform the UPDATE:

    UPDATE your_table SET
        field = 
            CONCAT(
                SUBSTRING(field, 1, LOCATE('text1', field) + 5),
                SUBSTRING(field, LOCATE('text2', field))
            )
    WHERE
        field LIKE '%text1%text2%'
    

    This will take the first part of the field column up-to the text “text1” (and including the text1 text itself), then will take a second sub-string from the field column for everything after (and including) the text2 text.

    If you want to “change” the text in-between these two values, for instance say you have text1 some-value text2 and you want it to become text1 new-thing text2, you could use the above query and put the new text in the middle:

    UPDATE your_table SET
        field = 
            CONCAT(
                SUBSTRING(field, 1, LOCATE('text1', field) + 5),
                ' new-thing ',
                SUBSTRING(field, LOCATE('text2', field))
            )
    WHERE
        field LIKE '%text1%text2%'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to delete some images from the browser (firefox2) memory using javascript?
is it possible to delete a file(s) inside the directory by just using javascript
I was just wondering if it was possible to delete a directory when the
Thanks for previous replies, is it possible to delete the stored content from sqlite
Possible Duplicate: Automatically delete files from webserver I'm logging some XML content to a
I've configured an InstallShield setup to delete certain VDs from IIS right before the
Possible Duplicate: Delete a folder on SD card In my app i saved all
Is it possible to delete all databases that were created by a specific user?
Is it possible to delete data in a table and replace it with new
Is it possible to delete files using WebDav by file name pattern? For example,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.