Home Answers Viewqa SQL delete data from database

 
 


Prasad
delete data from database
1 Answer(s)      4 years and 8 months ago
Posted in : SQL

View Answers

November 13, 2008 at 6:21 AM


Hi friend,

<%@ page language="java" import="java.sql.*" %>

<%
Connection con = null;
String url = "jdbc:mysql://192.168.10.211:3306/";;
String db = "amar";
String driver = "com.mysql.jdbc.Driver";
String userName ="amar";
String password="amar123";
try{
Class.forName(driver);
con = DriverManager.getConnection(url+db,userName,password);
try{
Statement st = con.createStatement();
String sql = "DELETE FROM Information WHERE username = 'Amardeep'";
int delete = st.executeUpdate(sql);

con.close();
out.println("successfully delete data from database!");

}
catch (SQLException ex){
System.out.println("SQL statement is not executed!");
}
}
catch (Exception e){
e.printStackTrace();
}

%>

--------------------------------------------

Visit for more information.

http://www.roseindia.net/jsp/user-search.shtml

Thanks.









Related Pages:
delete data from database - SQL
delete data from database  HOw to delete specific data from table> I want to delete one record from database. Thnx  Hi friend, -------------------------------------------- Visit for more information
insert and delete data in database
insert and delete data in database  insert and delete data in database from servlets through JDBC   Hi Friend, Please visit the following links: Insert Data Delete Data Thanks
How we delete a data of database from front end jsp page
How we delete a data of database from front end jsp page   I make a website and featch a data from data base and now i want that a delete button put in front of a featched data and when i clicked on this button then the data
delete an item from database
delete an item from database  how to delete an item from the database using jsp
JPA delete data
JPA delete data       In this section, you will learn how to delete data from database. You follow...=em.getTransaction(); entr.begin(); Query query=em.createQuery("DELETE FROM Student
JPA delete data
JPA delete data       In this section, you will learn how to delete data from database. You follow...=em.getTransaction(); entr.begin(); Query query=em.createQuery("DELETE FROM Student st
How to delete the row from the Database by using servlet
then the user data to be delete from the database table. Assume in Database table have...How to delete the row from the Database by using servlet  Dear Sir/Madam I am trying to delete the one user data in the Oracle SQL server database
Delete points from database
Delete points from database  I have a polygon on a web page and a delete button. The polygon is saved in the database in one table and in another...: mysqlquery("DELETE FROM polygon WHERE ID=".$GET['ID']."") or die(showsqlerrors(mysql
delete
delete  how delete only one row in the database using jsp.database... = conn.createStatement(); st.executeUpdate("DELETE FROM employee WHERE empid...); String query = "select * from employee"; st = con.createStatement
How to update,Delete database values from jtable cells ..
How to update,Delete database values from jtable cells ..  hello Sir... from database into jtable of a jpanel.. Now Sir, According to my need i have... to a particular cell will be updated into database and if we want to delete
Delete a row from database by id
Delete a row from database by id  I m creating a small application... all the values are added in to database and page is redirected to a new page...) for "DELETE" AND "UPDATE". On clicking delete which is hyper link that particular row
how to delete the access database value in jsp
how to delete the access database value in jsp  i loaded my database data into the dropdown list box...now i want to delete the value..plz send the source code to delete the value in dropdown list box and also from database
how to delete the access database value in jsp
how to delete the access database value in jsp  i loaded my database data into the dropdown list box...now i want to delete the value..plz send the source code to delete the value in dropdown list box and also from database
delete row
= $checkbox[$i]; mysql_query("delete from sonu where id='$delete...;   We are providing you the jsp code that displays the database table data... from the database. In the database we have created three fields bookid,author
delete record
deleted from the database. In the database we have created three fields bookid...=conn.createStatement(); for(int a=0;a<10;a++){ st.executeUpdate("delete from book where...delete record  how to delete record using checkbox and button in php
sqlite database delete row
sqlite database delete row  How to delete row from SQLite Database?    NSString *updateSQL = [NSString stringWithFormat: @"DELETE FROM aListDB WHERE id='%@'",details.ids
How to delete the row from the Database by using while loop in servlet
How to delete the row from the Database by using while loop in servlet  Dear Sir/Madam, I am trying to delete the one user data in the Oracle SQL.... It is Urgent...  When you retrieve the data from the Database by using
Search data from database - Java Beginners
Search data from database  Hi Deepak, This is not correct code... to user name. (means search all field from database and display using... in the previous page, then according to that, use the sql command as delete * from
data retrival from database throw simple jsp..
data retrival from database throw simple jsp..  We can retrieve the the data from data base simple jsp page: Jsp Page:retrive.jsp <...; Statement stmt = null; String Query="SELECT * FROM STUD"; try
selecting data from database
selecting data from database  how to select data from database using Dao in struts   Hi, You have to load the data from database using hibernate and send the data in a Java file object to jsp page. Please read at http
Delete database Table through hibernate and Spring
Delete database Table through hibernate and Spring  Hi, I am using Spring,Hibernate and Tapestry to save and also fetch data simultaneously from mysql database.I am facing a problem,whenever i refresh the number of data saved
The DELETE Statement
; The DELETE statement is used to delete rows from a table. database will update...;       DELETE FROM table_name WHERE... deleted . DELETE FROM Person WHERE LName = 'sonu
retrive data from database
retrive data from database   hi.. i made a application form. it's have attribute s.no,name,roll no and i enter a few records. now i want to view all record not in database access sheet i want to view it at any another
retrive data from database?
retrive data from database?  hellow i have a database sheet name as db1. it's contain sixty(60) sn,name ,rollno(primary key),father's name etc... from db1 and enter value in text box according there name,rollno and save
MySQL PHP Query delete
( ) delete query from a database table. MySQL PHP Query is used to delete the records... the database:".mysql_error()); $sql="delete from mytable where empid... ( ), that is used to delete a records from table using delete Syntax. The Where Clause
Delete a Column from a Database Table
Delete a Column from a Database Table   ... to delete a column from a database table. We are not going to create a new table... the already created table in the specific database. Now if we want to delete
JPA delete query - EJB
JPA delete query  Hi, I have an entity InvoiceItems.java. I want to delete all the records from the table. What will be the JPA query to delete... to achieve this: Query query = em.createQuery("delete from InvoiceItems o
Delete a Records in Database
from the table. The generalized Syntax  used for delete query in database are as : delete from table name; The above syntax is used to delete an entire... Delete a Records in Database   
MySQL PHP Query delete
( ) delete query from a database table. MySQL PHP Query is used to delete the records... in selecting the database:".mysql_error()); $sql="delete from mytable where... (0.00 sec)` Query to view data inserted in table: mysql> select * from mytable
fetch data from database in javascript
fetch data from database in javascript   How to fetch data from database in JavaScript when it is a leap year
how to retrieve data from database ?????/
how to retrieve data from database ?????/  how to retrieve data from database
how to retrieve data from database ?????/
how to retrieve data from database ?????/  how to retrieve data from database
how to retrieve data from database ?????/
how to retrieve data from database ?????/  how to retrieve data from database
how to retrieve data from database ?????/
how to retrieve data from database ?????/  how to retrieve data from database
The DELETE Statement, SQL Tutorial
; The DELETE statement is used to delete rows from a table. database will update...;       DELETE FROM table_name WHERE... deleted . DELETE FROM Person WHERE LName = 'sonu
To retrive data from database - Struts
To retrive data from database  How to get values ,when i select a select box in jsp and has to get values in textbox automatically from database? eg... come to jsp page automatically from database
DELETE
DELETE   I AM DOING IT IN MYSQL. DELETE FROM EMP WHERE SAL>(SELECT SAL FROM EMP WHERE ENAME='MILLAR') AND ENAME='ALLEN'; THIS IS GIVING...' for update in FROM clause ANY ONE PLEASE HELP ME. WITH REGARDS
Problem in accessing data from Database
Problem in accessing data from Database  hi..... i'm making a project on servlet and jsp with ms access 2007 at the backend. One field in my database is text and all others are of currency data type. If i enter 0 or null value
How to update,Delete database values from jtable cells ..
How to update,Delete database values from jtable cells ..  Hello Sir... from database to jtable .Now as per my requirement i need to update and delete the database records from the table cells by entering new values there only
How to update,Delete database values from jtable cells ..
How to update,Delete database values from jtable cells ..  Hello Sir, I am working on a project in which i have to fetch the values from database to jtable .Now as per my requirement i need to update and delete the database
Deleting All Rows From the database Table
helps us to write on the browser. To delete all the rows from our database table... From the database Table      ... after sometime . Rather than go through with that data its better to delete
retrieve data from database with hyperlink
retrieve data from database with hyperlink  sir....i have one table called 'name' having two values i have to retrieve those data with a hyperlink and show in browser and if we click hyperlink its shows his sub categories....how
inserting data from radio buttons to database - JSP-Servlet
inserting data from radio buttons to database  hi, i am getting error in my code of feedback form. once i finished selecting all the radio buttons and when i click on delete button. it points to the answer.jsp. answer.jsp
retrieve data from mysql database
retrieve data from mysql database  hi am not familiar in php.....even... selected value on combobox which is to be retrieve the relevant data from mysql database using php.... below my code is that.. <html> <head>
retreive integer data from database
retreive integer data from database  i made a table named result...=lalit&database=mydb"); String url="select marks from student where rollno... and two buttons "ok" and "cancel" i want to take input from textfield
Getting Textbox data from database
data from database and display it on the textboxes. <%@page language="java...Getting Textbox data from database  When i m trying to get data in textbox as readonly from database i m getting following error.and my code is shown
GWT -- retrive the data from Database
GWT -- retrive the data from Database  the user can create an event. In the create page, we have three buttons. Save as draft, preview and save... button, you have to create a dynamic jsp which should read the contents from
Getting Textbox data from database
;Here is a jsp code that retrieves data from database and display...Getting Textbox data from database  When i m trying to get data in textbox as readonly from database i m getting following error.and my code is shown
Data retrieve from mysql database
Data retrieve from mysql database  Hi sir, please give some example of jsp code for retrieving mysql database values in multiple dropdown list... from the dropdown, related data will get displayed on the textboxes. Here we have
Delete a Specific Row from a Database Table
Delete a Specific Row from a Database Table   ... in a row, now we need to delete that wrong data. This can be done very easily... from a specific database table. Here is an example with code which provides