如何使用select和where查询选择多个值? [英] how to select multiple values using select and where query?

查看:1332
本文介绍了如何使用select和where查询选择多个值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从列车时间选择*,其中TrainNo = 11026,11201,12213;



我想选择这些值,但是它给出了错误..

解决方案

 选择 * 来自 traintime 其中 TrainNo  IN  11026  11201  12213 


尝试

从 traintime 中选择* 其中 trainno 中的code-keyword>( 123  124 ,...)


"select * from traintime where TrainNo=11026,11201,12213";

I want to select these values but it is giving an error..

解决方案

select * from traintime where TrainNo IN (11026,11201,12213)


Try

Select * from traintime where trainno in (123,124,...)


这篇关于如何使用select和where查询选择多个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆