select * from table_name where id in(1,2,3...)
  • Oracle9:256个
  • Oracle10:1000个
  • Mysql:不限制个数;但是整条sql语句大小是有限制的(max_allowed_packet),默认4M

相关文章: