I have two databases, one is called Natalie_playground and one is called LiveDB. Since I want to practice insert, update things, I want to copy som
Natalie_playground
LiveDB
Try this:
If target table is exists :
SELECT SourceTableAlias.* INTO TargetDB.dbo.TargetTable FROM SourceDB.dbo.SourceTable SourceTableAlias
And if target table is not exists :
INSERT INTO TargetDB.dbo.TargetTable SELECT SourceTableAlias.* FROM SourceDB.dbo.SourceTable SourceTableAlias
Good Luck!