File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
ruby shaw
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic