Dec012009

copy data postgresql

Published by Didik at 2:37 PM under

hello guys
here is a little trick of postgresql copy data to other similar table with "insert".
if you have 2 similar table and you want to backup it with a single click from your application you can try this :
for example if u have table employee and employee_backup and you want to copy all of
employee data to employee_backup you can do this query
"insert into employee_backup (select * from employee)".
it works not just for table but also for view.

Tags:

1 Responses

Comments (1) -


Anton Setiawan

Response by Anton Setiawan on 12/6/2009 3:54:36 AM

Nice info, bro.
This will work for MS SQL too



Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading