Jayraj Chhaya

Jayraj Chhaya

  • 353
  • 4.8k
  • 66.9k

SQL Data clone

Jan 8 2024 11:37 AM

I have multiple Db with same table schema in all DB.
Now I want to globalization.

I create a new DB and create same table scema.Now,I wan't to insert all records from all databases and checked when data Insert if same name is exsist then Update else Insert.

For example,

DbName :- [Db1,Db2,Db3]
Table Name :- Tax
Column Name :- 'Name'
Records Count :- [5,2,3]

OUTPUT
DbName :- Global
Table :- Tax
Column Name :- 'Name'
Total Records :- 10


If Name is already exsist in Tax table in global DB then update else insert.

Note :- all DB is different but schema is same.

Suggest and give advice for above problem statement.


 


Answers (4)