This JDBC program uses a SQL query to retrieve and display the employee number, name, department, and salary of employees whose department is "Computer Science" from an emp1 database table. The program establishes a connection to the database, executes the query, iterates through the result set to print out the retrieved field values, and closes the connection. It outputs the employee details of three employees from the Computer Science department.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
112 views1 page
Slip3 1
This JDBC program uses a SQL query to retrieve and display the employee number, name, department, and salary of employees whose department is "Computer Science" from an emp1 database table. The program establishes a connection to the database, executes the query, iterates through the result set to print out the retrieved field values, and closes the connection. It outputs the employee details of three employees from the Computer Science department.