开发者

How to write this sql query with SubSonic3?

开发者 https://www.devze.com 2023-01-27 09:16 出处:网络
UPDATE 开发者_JAVA技巧 Scenarios.Blocks SETOrderId = OrderId - 1 So, it\'s basically updating a column with its current value minus one.This should help:
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

精彩评论

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