How to display mysql database records as per clock timing?

How to display mysql database records as per clock timing?

I want to display database records as per clock timing.

View Answers

April 28, 2012 at 3:28 PM

import java.sql.*;

class RetrieveData 
{
    public static void main(String[] args) throws Exception
    {
                Class.forName("com.mysql.jdbc.Driver").newInstance();
        Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root" );
        Statement st=conn.createStatement();
        ResultSet rs=st.executeQuery("select * from data");

        while(rs.next()){
            String name=rs.getString("name");
            String address=rs.getString("address");
            String contact=rs.getString("contactNo");
            String email=rs.getString("email");

            System.out.println(name+" \t "+address+" \t "+contact+" \t "+email);
            Thread.sleep(2000);
        }
    }
}

Ads









Related Tutorials/Questions & Answers:
How to display mysql database records as per clock timing?
how to display records from database
Advertisements
how to display image and text in single jsp page from the mysql database
retrieving newly added records from mssql database and display in a jsp
How to display data fom MySQL DataBase-table in to JSP file by submitting a value in combobox.
how to write a query for adding records in database
How to display all the Select values from the MySQL database table in where condition= In JSP?
image is display from path of mysql database
MySql Databse query to fetch results from database and display it in HTML File
how to display the database values in pdf format
How to retrieve and display image from database in Java?
displaying List of records from database in a jsp using ajax, onclick it should display the results ?? its urgent can u help me
how to connect to database in php using mysql
How to use next and previous button(or href) for database table that is retrieved from MySQL DB.
how to import excel sheet into mysql database and save it as a table in database
how to display data from jsp file into database
How to retrieve image from mysql database in JSP?
display database results
How to display data from database in a TableView
How to access (MySQL)database from J2ME?
How to retrive a particular record from database in php with mysql?
Display PHP clock with user input date and time
MYSQL Database
How to display image in jsp from database using Servlet?
How to connect to MySql Database from Servlet?
how to display values from database into table using jsp
How to Import mysql database command line, Import MySQL dumpfile, SQL datafile into my database ?
how to display or retrive an image in jsp whose path is stored in oracle database
how to display data into textboxes which is retrieved from the database
how to display data into textboxes which is retrieved from the database
how to display data into textboxes which is retrieved from the database

Ads