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

  • Home
  • SEARCH
  • 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 8711273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:50:12+00:00 2026-06-13T04:50:12+00:00

I have created table as create table tab (id int, mytext varchar(200)); Now I

  • 0

I have created table as

create table tab (id int, mytext varchar(200));

Now I inserted values as

insert into tab values
(1, 'text 11,text 12,'),
(2, 'text 21,text 22,'),
(3, 'text 31,text 32,'),
(4, 'text 41,text 42,');

Now what I wanted to do is add text text none, at the start of the text. For that I had to execute query as

update tab set mytext = concat('text none,', mytext)

However, mistakenly I executed the query as:

update tab set mytext = concat('text none', mytext)

I missed the COMMA (,) after ‘none’.

Now I have data as

1   textnonetext 11,text 12,
2   textnonetext 21,text 22,
3   textnonetext 31,text 32,
4   textnonetext 41,text 42,

What I want is change above output to:

1   textnone,text 11,text 12,
2   textnone,text 21,text 22,
3   textnone,text 31,text 32,
4   textnone,text 41,text 42,

i.e. add comma(,) after none.

Any idea how to get this done?

SQL Fiddle for testing

Note : The length of the original data in the mytext fields is not fixed; for some ids it’s 6, for some it’s 50.

  • 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-13T04:50:13+00:00Added an answer on June 13, 2026 at 4:50 am

    Try this one,

    update tab 
    set mytext = concat('text none, ', Replace(mytext, 'text none',''));
    

    SQLFiddle Demo

    or simply do replace if you don’t have any special reason to use concat

    update tab 
    set mytext = Replace(mytext, 'text none','text none, ');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created table and inserted values as below. create table mytable (id INT,
I have Created a table like CREATE TABLE [dbo].[tab1]( [Id] [int] NOT NULL, [Name]
I have created one table using the below command: create table Table1( Id int
Below is how my table is create table tab (id INT, fullname varchar(100)); Data
I have some tables on sybase-iq data base, created for example: create table tab
I have the following database table created thus: CREATE TABLE AUCTIONS ( ARTICLE_NO VARCHAR(20),
I have just created this table: create table dbo.OrderTypes ( ID smallint primary key
I have created a table with the following structure- $sql = CREATE TABLE followers
I have a table created like this: CREATE TABLE rh857_omf.picture(MeasNr TINYINT UNSIGNED, ExperimentNr TINYINT
I have created a view for a table as: CREATE VIEW anonymous_table AS SELECT

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.