problem related to query in mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sandeep Shah
    New Member
    • Feb 2008
    • 11

    problem related to query in mysql

    hello friends
    I just want to know the query to find the number of table in one schema in MYSQL Database.

    waiting for your rply
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by Sandeep Shah
    hello friends
    I just want to know the query to find the number of table in one schema in MYSQL Database.

    waiting for your rply
    Are you talking about
    [CODE=mysql]show tables;[/CODE] ?

    Comment

    • Sandeep Shah
      New Member
      • Feb 2008
      • 11

      #3
      Originally posted by r035198x
      Are you talking about
      [CODE=mysql]show tables;[/CODE] ?


      Thank's friend
      But I want to find the number of table in one schema.
      I got the name of table in one schema thrgh your query.

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by Sandeep Shah
        Thank's friend
        But I want to find the number of table in one schema.
        I got the name of table in one schema thrgh your query.
        [CODE=mysql]select count(*) from information_sch ema.tables where table_schema = "Your_Schem a";
        [/CODE]

        Comment

        • Sandeep Shah
          New Member
          • Feb 2008
          • 11

          #5
          Originally posted by r035198x
          Are you talking about
          [CODE=mysql]show tables;[/CODE] ?


          Thank's friend
          But I want to find the number of table in one schema.
          I got the name of table in one schema thrgh your query.
          waiting for your reply

          Comment

          • Sandeep Shah
            New Member
            • Feb 2008
            • 11

            #6
            Originally posted by r035198x
            [CODE=mysql]select count(*) from information_sch ema.tables where table_schema = "Your_Schem a";
            [/CODE]

            SELECT count(*) FROM information_sch ema.tables WHERE table_schema = "Your_Schem a";

            example myschemaname=ab c

            I wrote my schema's name (abc) in place of Your_Schema and
            when i execute this query i am getting the error like (Table abc.tables' doesn't exist )
            so wht should i do....

            Comment

            • r035198x
              MVP
              • Sep 2006
              • 13225

              #7
              Originally posted by Sandeep Shah
              SELECT count(*) FROM information_sch ema.tables WHERE table_schema = "Your_Schem a";

              example myschemaname=ab c

              I wrote my schema's name (abc) in place of Your_Schema and
              when i execute this query i am getting the error like (Table abc.tables' doesn't exist )
              so wht should i do....
              Post the exact query that you used.

              Comment

              • Sandeep Shah
                New Member
                • Feb 2008
                • 11

                #8
                Originally posted by r035198x
                Post the exact query that you used.

                Let say My database is "bufferabc_test "

                SELECT count(*) FROM information_sch ema.tables WHERE table_schema = "bufferabc_test ";

                I am getting this error >>> Table 'information_sc hema.tables' doesn't exist

                OR If i change the query in this way >>>>

                SELECT count(*) FROM bufferabc_test. tables WHERE table_schema = "bufferabc_test ";

                Then I am getting this error >>> Table 'bufferabc_test .tables' doesn't exist

                So wht should i do plz reply soon

                Comment

                • r035198x
                  MVP
                  • Sep 2006
                  • 13225

                  #9
                  Originally posted by Sandeep Shah
                  Let say My database is "bufferabc_test "

                  SELECT count(*) FROM information_sch ema.tables WHERE table_schema = "bufferabc_test ";

                  I am getting this error >>> Table 'information_sc hema.tables' doesn't exist

                  OR If i change the query in this way >>>>

                  SELECT count(*) FROM bufferabc_test. tables WHERE table_schema = "bufferabc_test ";

                  Then I am getting this error >>> Table 'bufferabc_test .tables' doesn't exist

                  So wht should i do plz reply soon
                  [CODE=mysql]count(*) FROM information_sch ema.tables WHERE table_schema = "bufferabc_test ";[/CODE]

                  should work. However, you need to be logged as a user sho has access to both the information_sch ema and bufferabc_test schema.

                  Comment

                  • Sandeep Shah
                    New Member
                    • Feb 2008
                    • 11

                    #10
                    Originally posted by r035198x
                    [CODE=mysql]count(*) FROM information_sch ema.tables WHERE table_schema = "bufferabc_test ";[/CODE]

                    should work. However, you need to be logged as a user sho has access to both the information_sch ema and bufferabc_test schema.


                    Thank's Friend
                    Your given query is working....I got the result which i want.

                    Comment

                    Working...