SQL语句查询问题
create table A as select art_no from article;
create table b as select art_no from tb_fin_art_stock where art_status=1;
上面的两个表是我SELETE的条件
select t.art_no from A,tax t where t.art_no=A.art_no and t.art_no not in (select art_no from B);
问题1: 上面这个SELECT语句可以优化么?怎么优化?
问题2:我想在不建立这两个表的情况下在SELECT语句中直接实现查询:
如:
select t.art_no
from tax t,(select art_no from A) a,(select art_no from B) b
where
这个条件应该怎么写啊??
谢谢各位大大了,祝各位大大心想事成,万事如意!
|