SELECT ProductCode FROM test_number where id=0 用SqlSugar写这个SQL语句
时间: 2023-04-09 11:03:32 浏览: 147
select form where 语句
可以使用以下代码来用SqlSugar写这个SQL语句:
var db = new SqlSugarClient(new ConnectionConfig()
{
ConnectionString = "your_connection_string",
DbType = DbType.MySql, // 根据实际情况选择数据库类型
IsAutoCloseConnection = true,
InitKeyType = InitKeyType.Attribute
});
var result = db.Queryable<test_number>()
.Where(it => it.id == 0)
.Select(it => it.ProductCode)
.ToList();
阅读全文