File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes SQL syntax for displaying the total count of tables from a database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL syntax for displaying the total count of tables from a database" Watch "SQL syntax for displaying the total count of tables from a database" New topic
Author

SQL syntax for displaying the total count of tables from a database

ruby shaw
Greenhorn

Joined: Apr 06, 2003
Posts: 3
Can anyone tell me the syntax for displaying the total count of the tables from any particular database using SQL server in VC++.
I used this "select count(*) as total from information_schema.columns where table_name =\'"
but it didnt work out.
-Thank You
Lilac Ezer
Greenhorn

Joined: Apr 08, 2003
Posts: 8
Here is the syntax for getting the number of user-defined tables in the database you are currently in:
select count(*) from sysobjects where type='U'
Hope that helps,
Lilac
sunita shaw
Ranch Hand

Joined: Apr 06, 2003
Posts: 45
hi! lilac
thanx but this query runs only on SQL Server but i want a suery that will run in Ms Access 2000 for retrieving the names of tha tables of a database.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL syntax for displaying the total count of tables from a database
 
Similar Threads
Building charts and graphs
SQL command to show tables
restoring database using sql file
Count total number of records in database
Tables Count in Sql Server