473,408 Members | 1,744 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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
Feb 19 '08 #1
9 1914
r035198x
13,262 8TB
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
Expand|Select|Wrap|Line Numbers
  1. show tables;
?
Feb 19 '08 #2
Are you talking about
Expand|Select|Wrap|Line Numbers
  1. show tables;
?


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.
Feb 19 '08 #3
r035198x
13,262 8TB
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.
Expand|Select|Wrap|Line Numbers
  1. select count(*) from information_schema.tables where table_schema = "Your_Schema";
  2.  
Feb 19 '08 #4
Are you talking about
Expand|Select|Wrap|Line Numbers
  1. show tables;
?


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
Feb 19 '08 #5
Expand|Select|Wrap|Line Numbers
  1. select count(*) from information_schema.tables where table_schema = "Your_Schema";
  2.  

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

example myschemaname=abc

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....
Feb 19 '08 #6
r035198x
13,262 8TB
SELECT count(*) FROM information_schema.tables WHERE table_schema = "Your_Schema";

example myschemaname=abc

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.
Feb 19 '08 #7
Post the exact query that you used.

Let say My database is "bufferabc_test"

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

I am getting this error >>> Table 'information_schema.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
Feb 19 '08 #8
r035198x
13,262 8TB
Let say My database is "bufferabc_test"

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

I am getting this error >>> Table 'information_schema.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
Expand|Select|Wrap|Line Numbers
  1. count(*) FROM information_schema.tables WHERE table_schema = "bufferabc_test";
should work. However, you need to be logged as a user sho has access to both the information_schema and bufferabc_test schema.
Feb 19 '08 #9
Expand|Select|Wrap|Line Numbers
  1. count(*) FROM information_schema.tables WHERE table_schema = "bufferabc_test";
should work. However, you need to be logged as a user sho has access to both the information_schema and bufferabc_test schema.


Thank's Friend
Your given query is working....I got the result which i want.
Feb 21 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Marcus | last post by:
I am having some problems with trying to perform calculations on time fields. Say I have a start time and an end time, 1:00:00 and 2:30:00 (on a 24 hour scale, not 12). I want to find the...
12
by: Gustaf Liljegren | last post by:
I've been learning using PHP and MySQL from the tutorial at freewebmasterhelp.com. Everything works fine, except deleting things. The script is invoked with a URL like this: ...
10
by: johnnyboy10017 | last post by:
I am having a hell of a time with what I think is a very simple query: It won't actually insert a new record into the specified table, but returns no error, in fact it returns "1" (or true) that...
0
by: Patrick Crowley | last post by:
I'm creating a tool to browse a database of movie listings. The browser pulls up 25 results at a time, and you can page through them using 'Next' and 'Prev' tools. Pretty basic stuff. Here are...
0
by: Phil Powell | last post by:
I have a rather complicated query with a combination of LEFT JOINs and two MATCHES where the first match is non-boolean to get the accurate score, the second to search as boolean: SELECT...
0
by: hiisikukko | last post by:
I have created project management software with Java and MySql and i works fine. This applet gets and writes information directly to MySql database. Problem is that those sqlClauses below(update...
3
by: os2 | last post by:
hi i have an insertion problem with my rtu table datatype for date1 field is: datetime i try to insert local date to the database (mysql) source code struct tm *date;
3
by: auron | last post by:
Hi there, I have a really stupid and banal problem with showing the results of a MySQL query in PHP, preciselly with MySQL count() function that gives to a variable in PHP the result. NOTE:...
3
by: Juan Antonio Villa | last post by:
Hello, I'm having a problem replicating a simple database using the binary log replication, here is the problem: When the master sends an update to the slave, an example update reads as follows:...
3
by: siikworm | last post by:
Hi, I'm having a couple of (possibly related) problems. 1) When I run this code as-is, I get an extra output to the screen...usually three numbers such as "559" or "205". The output appears in...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.