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
105 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 45

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Truncate vs Delete 63 88
INSERT INTO SELECT JOIN THING 2 26
C# SQL BULK INSERT CLASS 5 35
Access recordset not updateable 8 38
In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now