The moose likes JDBC and Relational Databases and the fly likes COUNT NUmber of folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "COUNT NUmber of folder" Watch "COUNT NUmber of folder" New topic

COUNT NUmber of folder

deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
Hi ,

Dont know whether this is the right place to ask this.

How to count number of folder.

There is a application in which docuemnt are placed inside a folder.There is one column in a database "isFolder" whcih cantell whether its a folder or not but there is no such separate table for folder.
Then how can we count number of folders.
Rob Spoor

Joined: Oct 27, 2005
Posts: 20128

SELECT * FROM <table> WHERE isFolder = 1 (true, or whatever your column type requires) will return you all folders, right? So SELECT COUNT(*) will return the number.

How To Ask Questions How To Answer Questions
deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
How to count the number of documents in a folder???
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

there is a field that says which folder a document belongs in, right? This sounds like parents and children in the same table. Can you post the real structure of the table?
I agree. Here's the link:
subject: COUNT NUmber of folder
It's not a secret anymore!