开发者

How to write this sql query with SubSonic3?

UPDATE 开发者_JAVA技巧 Scenarios.Blocks 
SET     OrderId = OrderId - 1 

So, it's basically updating a column with its current value minus one.


This should help:

db.Update<Blocks>.Set(x => x.OrderId == x.OrderId - 1).Execute();

If you want to have a where clause for your update query: Subsonic 3.0 UPDATE, multiple conditions

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜