select 1

select 1 from mytable;与select anycol(目的表集合中的任意一行) from mytable;与select * from mytable 作用上来说是没有差别的,都是查看{{是否有记录}},一般是作条件用的。select 1 from 中的1是一常量,查到的所有行的值都是它,但从效率上来说,1>anycol>*,因为不用查字典表。

posted @ 2018-09-11 09:51  酸奶加绿茶  阅读(980)  评论(0编辑  收藏  举报