tbl1表结构:
create table tbl1 (
f1 int,
f2 int,
f3 int
)
例1:
let list = await Select.select(conn, {
sql: `select * from tbl1 where f1=? and f2=?`,
where: [1, 2]
});
create table tbl1 (
f1 int,
f2 int,
f3 int
)
let result = await Select.selectOneValue(conn, {
sql: `select * from tbl1 where f1=?`,
where: [1]
});
结果,返回值为满足条件的第一条数据的f1字段值
tbl1表结构:
create table tbl1 (
f1 int,
f2 int,
f3 int
)
例1:
let list = await Select.selects(conn, [{
sql: `select * from tbl1 where f1=?`,
where: [1]
}, {
sql: `select * from tbl1 where f1=?`,
where: [2]
}]);
查询
Select