日期:2014-05-16  浏览次数:20862 次

这样一个SQL语言有其他写法吗?
insert   into   useful
select   *   from   record
where   name   in   (select   name   from   record   where   address= '10.20.126.65 '   group   by   name,admin,sex)
    and   admin   in   (select   admin   from   record   where   address= '10.20.126.65 '   group   by   name,admin,sex)
    and   sex   in   (select   sex   from   record   where   address= '10.20.126.65 '   group   by   name,admin,sex);


------解决方案--------------------
insert into useful
select * from record
where name+admin+sex in (select name+admin+sex from record where address= '10.20.126.65 ' group by name,admin,sex)