Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Moving Rows(Import/Exporting Tables)

Experienced Elementalist
Joined
Jan 3, 2008
Messages
299
Reaction score
1
There are two methods for helping you do this. One you will know very well, and the other, maybe not so well.

;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; Way One ;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;

This is the one you should know. Many people refer to it as Copy-Pasting.

1) Open the table you want to copy the rows from.
2) Highlight the rows you want to duplicate.
3) Right-click a highlighted row, and press Copy.
4) Go to the table/location/wherever you want to paste them.
5) Press CTRL+V
6) Save and exit. A restart may be required for changes to take effect.

#### NOTICE: You can only copy paste rows from table to table if they have the same number of columns, and if their columns allow the same type of values. Some columns only allow numbers, others, only letters, others, both, others, encryption, others, hex. ####

;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; Way Two ;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;

This is the one some of you might not know well of. Many people refer to is as importing and exporting tables.

You will be required to have two database backups. One will have the table(s) you want. The other one will be the database that you want to put the tables in. Restore the database you want to put the tables in to the database 'KN_online' in your SQL.

1) Make a dummy database in your SQL. Name it KN_online2 or something.
2) Restore the database that has the desired tables on to KN_online2.
3) Run this into a query and hit execute.
4) Save and exit. A restart may be required for changes to take effect.

Code:
select * into KN_online.dbo.TABLENAME from KN_online2.dbo.TABLENAME

#### NOTICE: Where it says TABLENAME, you may rechange that into the desired name you want it to be. ####

#### NOTICE: This will move ALL rows in that desired table. ####
 
Experienced Elementalist
Joined
Dec 7, 2006
Messages
250
Reaction score
2
nice, this will work aswell:(way two)

Code:
SELECT * FROM [db1]..TABLE INSERT INTO [db2]..TABLE
 
Back
Top