查詢
代碼如下 復制代碼 SELECT * FROM table1 WHERE table1.id IN (1, 2, 3, 4, 5, …, 999999)
刪除
代碼如下 復制代碼
DELETE FROM `table1` WHERE `id` in (835,836,837,…,999806)
子查詢
代碼如下 復制代碼 SELECT * FROM table1in中的參數數量是否有限制呢?
mysql 中in中可以設置任意數量的值,具體的數量只關系到max_allowed_packet參數的限制