File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
JDBC and Relational Databases
how to search values in database
Joined: Aug 01, 2006
Jan 29, 2009 17:44:04
I want to search values saved in database, I do not think it is good to retrieve all values from the database then search it.
May I know what is the best way to solve this problem.
Joined: Oct 04, 2003
Jan 29, 2009 18:25:29
What do you mean by search in database?
You can use WHERE Clause in SQL to search.
Joined: Feb 04, 2009
Feb 06, 2009 04:28:51
Get the values in a particular row using the SELECT query.
Check for the value in your code with the values retrieved from DB using the while loop.Simple.
If you are aware of the column name which hosts the value of yours, then retrieve only the values stored in that column rather than entire data in the table to reduce the overhead.
I agree. Here's the link:
subject: how to search values in database
Search from a JSP page
How to give search query if we select one than one value from combo box
frequently changing init parameters
jsf page refresh
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015