Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Contributor
3964 Points
999 Posts
Apr 12, 2012 12:19 PM|LINK
You're going to have to write some DDL scripts to first check for the existance of the table and if not exist create the table.
Here's some psuedo:
if not exists (select * from systables where tablename = 'myTable')
CREATE TABLE myTable(id int identity(1,1), Fname varchar(50))
else
select * from myTable
adamturner34
Contributor
3964 Points
999 Posts
Re: I need to copy one table of database to other database programmatically?
Apr 12, 2012 12:19 PM|LINK
You're going to have to write some DDL scripts to first check for the existance of the table and if not exist create the table.
Here's some psuedo:
if not exists (select * from systables where tablename = 'myTable')
CREATE TABLE myTable(id int identity(1,1), Fname varchar(50))
else
select * from myTable