select url, (length(url) - length(replace(url, ".", ""))) as UUU from wzzjnet_site WHERE url not like 'http://www%' limit 0,1000;sql如上
怎么查出UUU=1的记录,谢谢

解决方案 »

  1.   

    详细说明
    select * from (
    select url, (length(url) - length(replace(url, ".", ""))) as UUU from wzzjnet_site WHERE url not like 'http://www%' 
    limit 0,1000) a where uuu=1;
      

  2.   

    select url, (length(url) - length(replace(url, ".", ""))) as UUU 
    from wzzjnet_site 
    WHERE url not like 'http://www%' and (length(url) - length(replace(url, ".", "")))=1
    limit 0,1000;