Friday, May 3, 2013

MySql - Display tables in a database

Getting number of tables in a database:
select count(*) as tables from information_schema.tables where table_schema = 'dbname' and table_rows != 0

Getting tables in a database:
select * from information_schema.tables where table_schema = 'dbnameand table_rows != 0

Getting tables and columns in a database:
SELECT table_schema,table_name,column_name, ordinal_position, column_key
FROM information_schema.columns WHERE table_name in (
 SELECT table_name
 FROM information_schema.tables WHERE table_schema = 'dbname' and
 table_rows != 0


  1. Cookbooks have been used as fundraisers for decades and are still popular even in today's world. In fact, cookbook fundraising is increasing in popularity due to numerous cookbook publishing companies that handle the entire process online. Creating a personal fundraising cookbook, for a church, a school or even community is very easy and is a respected way to get money to finance many worthwhile projects.

  2. Your blog is awesome..You have clearly explained about Mysql ...Its very useful for me to know about new things..Keep on blogging..
    Hadoop training in chennai


  3. These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post.our giving articles really impressed for me,because of all information so nice.

    SALESFORCE Training in Chennai


  4. Great article,i get new ideas because of all given information very excellent and real words to implemented for you.Thank you so much shared that valuable information.
    CCNA Training in Chennai

  5. great doing. and i happy to visit your blog to know about this wonderful information. thanks for sharing. keep updating.
    iOS Training in chennai

  6. Nice..I have read your full content was really amazing,its more informative..You have clearly explained ..Keep on sharing..
    SEO Training in Chennai

  7. Купить для женщин сумки из кожи желательно у нас в Москве или на сайте кожанаясумка.рф, выбрать сумку из отборной кожи больших и нормальных размеров от лучших фабрик Италии. Купить сумки сколькокачественную модную сумку из классной кожи на нашем интернет-магазине легко, подобрать фасон, который Вам импонирует по сиайлу, ну и для ругулурного использования. Выполняем доставку в Москву или в другой городо России.