Copy / Insert Data from one table to another table in SQL Server

preview_player
Показать описание
In this video, you can see how to copy / insert data from one table to another table within same database or within two different databases in SQL server.
Sometimes it is required that you need to take some backup of one particular table.
SQL query is given below:

For Same database -

select * into dbo.TBL_EMPLOYEE_NEW
from dbo.TBL_EMPLOYEE

For Two different Database -

select * into TEST_DEMO_DB.dbo.TBL_EMPLOYEE_NEW
from TEST_DB.dbo.TBL_EMPLOYEE

-~-~~-~~~-~~-~-
Please watch: "10 Important Question and Answer on Swasthya Sathi স্বাস্থ্যসাথী Scheme - First Phase"
-~-~~-~~~-~~-~-
Рекомендации по теме
Комментарии
Автор

Nice, really nice. Your video just saved me.
I mistakenly updated a live live database and had to restore only a certain table and your video helped.
Please note that if the exact table exists in the database if should be deleted before restoring.

fomznumbers
Автор

Good one boss. But how can you copy from a table to another different table having different header configuration?

adodixn
Автор

I have an inventory table and a locations table. When i inserter the location column into the inventory table it shows null in the columns beside the columns with inventory data then finally shows the locations data on the right side after all the inventory data says null. How can i get the data beside each other?

DB-jvvi
Автор

Please make a video on ‘how to data migrate from one table to another Table by using store procedure in oracle.

SatyendraSingh-uliq
Автор

Hello great job. but it comes the same command create new_table and insert data at the same time.?

katienefoasoro
Автор

Hello Sir,

Please let me know the script for moving only updated data from one table to another in a different database.
So the thing is, I have already created the new DB and restore few tables there. Now I only want to move data that is updated in those tables today or every day.

Please Help!

pranalibagwe
Автор

Will it copy even the index of the table??

manishprabhakaran
Автор

this is not working, showing db2 does not exist but its exist

khushboogiri
Автор

Not working.. undeclared variable #1327 error

shaddycreation
Автор

i hvae tried in sql(livesqloracle):
CREATE TABLE CUSTOMERS(ID INT PRIMARY KEY, NAME VARCHAR2(20), AGE INT);
INSERT INTO CUSTOMERS VALUES(1, 'JACK', 20);
INSERT INTO CUSTOMERS VALUES(2, 'ALICE', 30);
INSERT INTO CUSTOMERS VALUES(3, 'JACKY', 25);
SELECT *FROM CUSTOMERS;

SELECT * INTO CUST FROM CUSTOMERS;

katienefoasoro
join shbcf.ru