开发者

Append to column-string without reading it from Database

how is it poss开发者_如何学编程ible to append to a column (type string) without reading the whole value from the database.

Let's say the column, named "mycol" contains the string 'TESTtestTEST' and now I want to APPEND to this string the value 'abc', so 'TESTtestTESTabc' is stored in column mycol.

How can I do this?

Thank you very much for your help!


beside the fact you are using EF as DataLayer, wouldn't this task be done with an UPDATE statement? If so, you can execute the remote/store command on the datacontext to either call a stored procedure ( good ) or passing directly the SQL ( not so good ).


In MySQL I would do: UPDATE my_table SET mycol=CONCAT(mycol,'abc') WHERE ID=1;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜