Need help in a java program or rather SQL or maybe the problem is in netbeans. Actually I don't know what is the actual problem
I have made a java project using netbeans and derby, with the database in netbeans itself. I don't know why but The SQL count function is not working as expected. In the program: e.g: "SELECT COUNT(*) FROM TABLE_NAME" works and gives the result in the resultset correctly while "SELECT COUNT(AGE) FROM TABLE_NAME WHERE AGE='youth' AND CONDITION='yes' " doesn't work and there is no data in resultset available. Why???? In the Netbeans' Services: I also tried running the sql query directly on the database from the services on netbeans but here even "SELECT COUNT(*) FROM TABLE_NAME" doesn't return anything (so how am I getting the result for this in my program?!!). But "SELECT * FROM TABLE_NAME" works. The count is not working at all. Why?? Kindly help me and thank you for going through such a long question. Reached ETC(End of thinking Capacity)