1

I have three mysql table named users,'clients' and 'products'. I want to count the 'id' field of every table in same query. Is it possible? please help me. Thanks in advance.

Riajul Islam
  • 1,425
  • 15
  • 19

1 Answers1

1

Please this statement

SELECT u.total_users, c.total_clients, p.total_products (
 SELECT COUNT(id) as total_users FROM users
) as u,
(
  SELECT COUNT(id) as total_clients FROM clients
) as c,
(
   SELECT COUNT(id) as total_products FROM products
) as p
Rezaul
  • 26
  • 3