Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 505
  • Last Modified:

how to copy and paste entire record between two similar tables in different schemas of same database

Hi,

I need to export and import( or otherwords copy and paste) entire record between two same structured  tables in different schemas ( say table_A is in schema_A and table_B is in schema_B. Table_B supposed to be same  as Table_A both with structure and data but  couple  of records missing which i need to copy from Table_A and paste into table_B)  of same database. What is the quickest way to do it. Any sample code, ideas, resources highly appreciated. Thanks in advance.
0
gudii9
Asked:
gudii9
1 Solution
 
flow01Commented:
insert into schema_b.table_b b
select * from schema_a.table_a a
where not exists (select 1 from  a.id = b.id)
0
 
gudii9Author Commented:
Thank you very much. I appreciate it.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Tackle projects and never again get stuck behind a technical roadblock.
Join Now