0

Hi All,

I have a sql query i am trying to get the count of how rows it returned.

select a.field1,
       b.field2,
       c.field2
       from table1 as a,
            table2 as b,
            table2 as c
        where a.field1=b.field1

Considered the above query return 9 rows. I want to get count of '9' in a mysql query. Please help. Thanks in advance.

Edited by k_manimuthu

2
Contributors
2
Replies
10
Views
1 Year
Discussion Span
Last Post by k_manimuthu
0

@pritaeas thanks, I am using the below query as well to get the same.

select count(*) as `count` from  (
select a.field1,
   b.field2,
   c.field2
   from table1 as a,
        table2 as b,
        table2 as c
    where a.field1=b.field1 ) tbl

Edited by k_manimuthu

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.