hello all

how to count numbar of mysql tables programmatically (c#)

thank you

Recommended Answers

All 2 Replies

hi,
This SQL query will help you

SELECT count(*) TABLES, table_schema
  FROM information_schema.TABLES
    WHERE table_schema= 'YOUR DATABASE NAME'
      GROUP BY table_schema

It gives the number of tables in the database you specify. Worked for me:)

thanks hericles

I will use it in my code

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.