select 1 from tab;

  1.  select 1 from table ;select any col from      table (any col is any row of purpose collection) ;select * from table 作用上来说是没有差别的,都是查看是否有数据记录,一般是做条件用的。Select 1 from table中的1 是一个常量,查到所有的值都是它,但是从效率上来说 1> anycol >      *,因为不用查字典表。
  2. 查看记录条数时可以用 select count(1)from table 等价于select count(*)      from mytable;
原文地址:https://www.cnblogs.com/sangmu/p/6886190.html