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;
精彩评论