一个字段里面每行都是0-100里面的一个数, 怎么查这个字段里在0-100里没有出现数字的行。

解决方案 »

  1.   

    一楼的方法已经很直接了 
    create table temp1(a int not null auto_increment primary key,b int);
    insert into temp1(b) select 1;
    insert into temp1(b) select b from temp1;
    insert into temp1(b) select b from temp1;
    insert into temp1(b) select b from temp1;
    insert into temp1(b) select b from temp1;
    insert into temp1(b) select b from temp1;
    insert into temp1(b) select b from temp1;
    insert into temp1(b) select b from temp1;