请教如何实现多条件查询?

例如,我有三个个列一个为防伪码,一个为产品名称,一个为产品价格。输入防伪码可以显示产品名称和价格
现在我只能一次查询一个防伪码,多了就不显示数据,请问如何实现同时查询多个防伪码,然后显示多条数据?

where 后面的条件用or方式啊
比如where code = 1 or code = 2 or code = 3;这样

希望能帮到你。

select * from XXXX where 防伪码 in ( 1,2,3) 这样也行呀,这样写方便于拼动态SQL

要看你是在哪里实现的了,上面两位给出的是具体的查询SQL代码,这个是后台处理的事情,先要搞清楚你在哪里输入,网页或者本地程序?

要么在条件里面多拼接 or
要么 使用 in(...)
要么你多次的查询再union下

多个条件根据你的逻辑关系and,or不就行了

条件查询 or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,or and but,