sql运算符_带SQL示例的IN运算符

sql运算符

When you have multiple conditions to be checked, we can use IN operator instead of it. It specifies the multiple values in a WHERE clause.

当您有多个条件要检查时,我们可以使用IN运算符代替它。 它在WHERE子句中指定多个值。

Syntax:

句法:

    SELECT column_name FROM table_name WHERE column_name IN (value1… valueN);

Example:

例:

Table 1:

表格1:

customer_IDcustomer_NameAddresscityCountry
3Aman GautamRoxyGwaliorIndia
2Atul AnandVinay nagarGwaliorIndia
1Bharti ParmarSaptaBiharIndia
4Partha BiswasTripuraWest bengalIndia
顾客ID 顾客姓名 地址 国家
3 阿曼·高塔姆(Aman Gautam) 乐声 瓜廖尔 印度
2 阿图尔·阿南德(Atul Anand) Vinay Nagar 瓜廖尔 印度
1个 巴尔蒂·帕玛(Bharti Parmar) 萨帕塔 比哈尔 印度
4 帕萨·比斯瓦斯(Partha Biswas) 特里普拉 西孟加拉邦 印度

Query to find customer_name and address where city is bihar

查询以查找customer_name和比尔所在城市的地址

IN Operator

Conclusion:

结论:

In this article, we have learnt how to use IN Operator? I hope you understand the concept; if you have any query, feel free to ask in the comment section.

在本文中,我们学习了如何使用IN运算符? 希望您理解这个概念; 如果您有任何疑问,请随时在评论部分提问。

翻译自: https://www.includehelp.com/sql/in-operator-with-example.aspx

sql运算符

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值