hai frnd...i'm prashob not deepak....
i think u r working with jsp....
then on clicking this search and delete(both shpould be submit type) forward it to a new jsp page,
//this is initialization
<%@ page import="java.sql.*" %>
<%! Connection con;
String url="jdbc:db2://url/db:"; //this is the url to ur database
//this is class loading.here i used type4 driver for ibm db2.change according to ur db.
System.out.println("After Establishing connection");
<tr><td>NAME</td><td>last name</td></tr> //this is table header
//i assume ur table name as "table" and the column name as name.and this table's first column as name and second column as last name
rst=st.executeQuery("select * from table where name='"+request.getAttribute("name")+"' order by 1");
//the following statement is for displaying the names.
<td> <%= rst.getString(1) %></td>
<td> <%= rst.getString(2) %></td>
System.out.println("After reading values");
this is the case for displaying names on a page..
if u want to delete ,then find out which submit button is pressed in the previous page,
then according to that,
use the sql command as delete * from table where name "the value passed from the previous page..
i mean request.getParameter("name");
hope it would help u....
for further needs ...get me at [email protected]
thanks and regards