Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simplest way to append data to a SQL Column [closed]

Tags:

I'm sure i can figure something out using replace, etc, but just wondering if there is anything out there that lets you simply append data to a column rather than how the common Insert function works?

Well I guess i can do INSERT INTO TABLE (NAME) SELECT Name + @Name right?

like image 512
Control Freak Avatar asked Feb 16 '12 15:02

Control Freak


People also ask

How do you append data to an existing table in SQL?

You use an append query when you need to add new records to an existing table by using data from other sources. If you need to change data in an existing set of records, such as updating the value of a field, you can use an update query.

How do I add to the end of a string in SQL?

To append a string to another and return one result, use the || operator. This adds two strings from the left and right together and returns one result. If you use the name of the column, don't enclose it in quotes. However, in using a string value as a space or text, enclose it in quotes.


1 Answers

Without more details, here's a simple example:

UPDATE YourTable     SET YourColumn = YourColumn + 'Appended Data' 
like image 195
Joe Stefanelli Avatar answered Oct 02 '22 23:10

Joe Stefanelli