Online Hibernate Training just in Rs. 1000

One week online training in Hibernate ORM framework. Learn Hibernate Framework and enhance your skills. Best Online Hibernate training at 90% discount. Join Now!! Offer is valid Only for limited Period!!! Online Training Big Data and Hadoop Training Java Training  




Share on Google+Share on Google+

1 Answer(s)      6 years and 4 months ago
Posted in : Java Beginners

I want my result from data base coming after executint select query fitered by some key words so plase give me the suggestion

View Answers

April 6, 2011 at 4:04 PM

import java.sql.*;
class  Retrieve{
public static void main(String[] args){
        int id=2;
           Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root");
           Statement st=con.createStatement();
           ResultSet rs=st.executeQuery("select * from employee where id="+id+"");
              System.out.println("Name: "+rs.getString("name"));
              System.out.println("Address: "+rs.getString("address"));
              System.out.println("Contact No: "+rs.getInt("contactNo"));
              System.out.println("Email: "+rs.getString("email"));
    catch(Exception e){



Related Tutorials/Questions & Answers:
Traversing through filtering
Traversing through filtering       Traversing through filtering Using jQuery, you can... filtering. Miscellaneous Traversing Tree traversal. Traversing through
Dojo Filtering Select
Dojo Filtering Select         In this section, you will learn about the dojo filtering... to user to enter your text in the  filteringselect. Try Online: Filtering
sorting and filtering the displayed table data using jsp and xml
sorting and filtering the displayed table data using jsp and xml  I have created a xml file and a jsp file, which uses DOM parser to display the content of xml file in web page. Now I would like to sort and filter those data
Text Editor Extensions
Text Editor Extensions       ETEE is an Eclipse plug-in which extends the Eclipse text editors with some extra capabilities for filtering the text using command line
Problem With Combo Box Editable Property
Problem With Combo Box Editable Property  Hi I am new To Flex i had set Combo Box Editable Property as true. But I didn't get the property filtering in the combo box like when you enter text "S" in the combo box then the names
Java file filter
files, this is said to be filtering the files. The interface  FilenameFilter provides the logic of filtering. It will display a list of files with some
Velocity Web Edit
Outline With XML Node Filtering and Intuitive Images * Smart Indenting
File download security.
; In this script, filter_var() is used for filtering the file and valid
Setting a Filter on a Logger Handler in Java
the filtering facility that means when you set a filter on a logger object, the filter... creates a logger object that assists for filtering the data and it has three classes... and NumFilter class provides the facility for filtering data that implements
will be able to work with report (sorting, filtering, grouping, export to Microsoft
Data Provider Controls in Flex
functionality of data accessing, sorting, filtering and other collection functionalities
Security Measure of Website
the security aspect by error checking through forms, filtering output
dhtmlxCombo - Ajax Autocomplete Combobox
. Filtering mode 6. Autocomplete mode 7. Editable mode   Four modes:  
Miscellaneous Traversing
() This method ends the most recent filtering operation in the current chain
for-each loop in java
. for-each loop is not used for filtering. Example :  A program using
Artifactory Maven, Artifactory 1.2.5, Maven 2 Enterprise Repository Released
supports remote Maven1 repositories proxying. * Backup Cleanup and Filtering - Automatic cleanup of old backups according to a retention period, plus filtering
Introduction to Filter I/O Streams
. These methods performs some sort of filtering operations on the data and cannot.... FilterIntputStream and FilterOutputStream do not perform any filtering
doubt in connecting to mysql in flex - XML
you want to show and on which column enable filtering; Click on Finish and thats
doubt in connecting mysql in flex - XML
want to show and on which column enable filtering; Click on Finish and thats all
Open Source JMS
* Persistence using JDBC * Local transactions * Message filtering using SQL92-like
Jaret Table
excel integrated filtering (autofilter-style, customizable) and sorting
excel integrated filtering (autofilter-style, customizable) and sorting
Mysql Date Filter
rows in set (0.00 sec) Query for filtering the record by date:- The given
Email - Electronic mail
hosting companies will provide you round the clock support, spam filtering
Sitemap Linux Tutorial
Color Picker | Dojo drag and drop | Dojo Editor | Dojo Filtering
Not able to filter rows of jtable with textfield in netbeans
not working means it is not filtering data and even i am not getting any exception
Not able to filter rows of jtable with textfield in netbeans
not working means it is not filtering data and even i am not getting any exception
VoIP Routers
content filtering. Versions are also available with an ISDN interface and a built... Vigor2800VG includes features such as VLAN, QoS, Content filtering, VPN support for up
PHP Filter
, and filtering easier which are the essential part of web application development... Sanitization: Similarly there is another type of filtering is offered by PHP, called
How to insert multiple checkboxes into Msaccess database J2EE using prepared statement - Java Beginners
you. I'll now work on the filtering part....Thank you. You make it possible