Create Procedure Demo @SourceDatabase as nvarchar(100), @TargetDatabase as nvarchar(100) as exec ( 'insert into' +@TargetDatabase+'.dbo.tblContact') exec('select * from ' +@SourceDatabase+'.dbo.tblContact')
exec ( 'insert into' +@TargetDatabase+'.dbo.tblContact ' + 'select * from ' +@SourceDatabase+'.dbo.tblContact')
exec ( 'insert into' +@TargetDatabase+'.dbo.tblContact')
'insert into' + @TargetDatabase+'.dbo.tblContact' (columna,columnb...) values (value1,value2)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)