Click here to Skip to main content
15,888,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a page on that I am doing editing of employee and on that page's page load event I am retrieving all the data of the employee.
But I would like one that i.e. after clicking on the update button the data should be updated and the previous one data (I mean the data before editing) should be saved in table (in another table that is made by us already same as the table of insertion).

Please help me with the SQL query for this.
Posted
Updated 11-Nov-11 22:52pm
v2
Comments
Mehdi Gholam 11-Nov-11 3:54am    
Queries are bound to table structures, so yo must supply your table structures first.

First get the data from the first table and insert into second table and then update the first table based on primary key.
 
Share this answer
 
Comments
Member 8387468 11-Nov-11 4:46am    
have done by this command i.e.
insert table2 select * from table1where condition=?
Just type the insert query like this

SQL
Insert into tablename values(employeename varchar(20))
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900