I want to update 1 column in SQL Table. Example: Current value in column is like this
2013/09/pizzalover.jpg
2013/10/pasta.jpg
Now i want to update whole column like this : www.mypizza.com/2013/09/pizzalover.jpg Is there any way I can accomplish this? Thanks in advance
If you want to add data to your SQL table, then you can use the INSERT statement. Here is the basic syntax for adding rows to your SQL table: INSERT INTO table_name (column1, column2, column3,etc) VALUES (value1, value2, value3, etc); The second line of code is where you will add the values for the rows.
To add/ concatenate text values within a select clause, you can use concat() function.
If you are using MYSql, you can use the concat()
as :
update tableName set columnName= CONCAT('www.mypizza.com/', columnName);
SQLFiddle
If you are using oracle you can use the concatenation operator '||' as :
update tableName set "columnName"='www.mypizza.com/'||"columnName";
SQLFiddle
In SQL Server you can use +
for string concatenation as:
update tableName set name='www.mypizza.com/'+columnName;
SQLFiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With