我想实现以下功能:
表结构为 t_goods(gid int, storeid int--仓库ID)
用户界面上允许随机选择想统计的仓库(可以不选或选多个),根据用户选择的仓库查询出t_goods表中符合条件的记录,我考虑是用 select * from t_goods where storeid in (...) 形式查询,可是 in 后面的条件怎么写呢?
...全文
15211打赏收藏
请问这样的查询语句怎样写
我想实现以下功能: 表结构为 t_goods(gid int, storeid int--仓库ID) 用户界面上允许随机选择想统计的仓库(可以不选或选多个),根据用户选择的仓库查询出t_goods表中符合条件的记录,我考虑是用 select * from t_goods where storeid in (...) 形式查询,可是 in 后面的条件怎么写呢?