复合主键咨询 返回
SqlSugar
沟通中
2
189
悬赏:0 飞吻
[SugarTable("production_task", TableDescription = "生产任务表")]
public class ProductionTask: StandardField, ITenantField
{
[SugarColumn(ColumnName = "tenant_id", ColumnDescription = "租户id", IsPrimaryKey = true)]
public long TenantId { get; set; }
[SugarColumn(ColumnName = "production_date", ColumnDescription = "生产日期", IsPrimaryKey = true)]
public DateTimeOffset ProductionDate { get; set; }
[SugarColumn(ColumnName = "_id", ColumnDescription = "自增id", IsPrimaryKey = true, IsIdentity = true)]
public override long Id { get; set; }
}
TenantId + ProductionDate + Id 是复合聚集索引 , 现在希望ProductionDate 设置倒序该如何做到, 是为ProductionDate再建立个倒序普通索引吗 , 感谢回复
热忱回答(2)
-
fate sta VIP0
1周前暂时不支持可以写SQL实现,只支持默认主键索引
0 回复 -
风涧丶Hx VIP0
1周前
多谢0 回复