logo
  • 教程列表
  • SO官方文檔
  • IN 子句
    • 簡單的 IN 子句
    • 將 IN 子句與子查詢一起使用
  1. StackOverflow 文件
  2. SQL 教程
  3. IN 子句
  4. 簡單的 IN 子句

簡單的 IN 子句

Created: November-22, 2018

獲取具有任何給定 id 的記錄

select * 
from products
where id in (1,8,3)

上面的查詢等於

select * 
from products
where id = 1
   or id = 8
   or id = 3
  • 將 IN 子句與子查詢一起使用
  • IN 子句

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明