摘要: 今天用到了select 1和not exists关键字,做如下解释:select * from tab1 where not exists (select 1 from tab2 where tab1.col=tab2.col)因为你select 1 from tab2 where tab1.col=tab2.col这个查询不需要得到查询结果用select 1 的效率比select columnname高 所有就用select 1select 1 from table;与select anycol(目的表集合中的任意一行) from table;与select * from table 从作用 阅读全文
posted @ 2012-07-25 16:21 流浪在阿尔卑斯的野狼 阅读(868) 评论(0) 推荐(0) 编辑