select count(*) as count from r,s,d where r.owner='me' and s.owner='me' and d.owner='me';
试试!!!

解决方案 »

  1.   

    select count(*) 
    into :li_count
    from r,s,d 
    where r.owner='me' and 
          s.owner='me' and 
          d.owner='me';
      

  2.   

    select sum(r.owner='me') from r, s, d
      

  3.   

    都不行啊!!!
    select count(*) 
    into :li_count
    from r,s,d 
    where r.owner='me' and 
          s.owner='me' and 
          d.owner='me'into:li_count是什么意思??
      

  4.   

    select count(1) 
    into :li_count
    from (
    select 1 from where r.owner ='me' union all
    select 1 from where s.owner ='me' union all
    select 1 from where d.owner ='me') as temp
    INTO 是将返回值放到变量里
      

  5.   

    You have an error in your SQL syntax near ':li_count FROM ( SELECT 1 FROM where receive_box.owner ='me' union all SELECT 1 抱错!!!
      

  6.   

    create table r(owner char(8));
        create table s(owner char(8));
        create table t(owner char(8));
        insert into r values('me');
        insert into r values('me');
        insert into s values('me');
        insert into s values('me');
        insert into s values('you');
        insert into t values('me');
        insert into t values('me');
        insert into t values('me');
    //查询
    select ((select count(owner) from r where owner = 'me') + (select count(owner) from s where owner='me') + (select count(owner) from t where owner='me')) as sum
    //结果
     sum 
    -----
       7是不是这个意思?