Solved

How to import data from one database table to another database table, in the same sql express 2012?

Posted on 2014-11-09
3
108 Views
Last Modified: 2014-11-10
Can this be done in sql express 2012, if so, how?
Thank you.
0
Comment
Question by:lapucca
3 Comments
 
LVL 6

Accepted Solution

by:
Mandeep Singh earned 167 total points
ID: 40432008
hi

Without Identity Column
insert into test.dbo.DUMMY select * from TESTING.dbo.DUMMY

With Primary Key


set identity_insert test.dbo.dummy on
go
insert into test.dbo.DUMMY(ID,NAME,ROLLNO,CLASS) select ID,NAME,ROLLNO,CLASS from TESTING.dbo.DUMMY
go
set identity_insert test.dbo.dummy off
go
0
 
LVL 10

Assisted Solution

by:HuaMinChen
HuaMinChen earned 166 total points
ID: 40432183
Hi,
You can create the relevant table like
use schema2
go

select *
into tab2
from schema1.dbo.tab1

Open in new window

0
 
LVL 47

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 167 total points
ID: 40432241
You can use the Import/Export wizard. Just right-click on the database name and chose Tasks/Import Export...
Follow the wizard and that's it.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question