Uploading or copying a current DB

A

Anonymous

Guest
when you export a db it just exports the tables and info. If you want to import into a new db you must create a blank db select the SQL in the right pane and either paste into the query box or select the text you want to import.
 
im not sure if i understand what you mean, but i think i do...

like i have a table named `users` and when i export it and want to put it into the same database with a different name like `users_old` what i do is open the users.sql file in wordpad, use the find/replace function to replace `users` with `user_old` and then save that file, and import that sql file into the database so it has everything the other did, and now their's `users` and `users_old` in the database...
 
You want to backup a table, right !?
For copying/backuping a table use MySQL's INSERT INTO Statement.
Choose one that fits you:
Code:
// 1:

SELECT * INTO table_backup FROM table

// 2:

SELECT table.* 
INTO table 
   IN 'table_backup.mdb' 
   FROM table

// 3:

SELECT column_names(s) 
INTO table_backup 
   [IN external_database] 
   FROM table

// 4:

SELECT field_1, field_2 
INTO table_backup 
   FROM table

// 5:

SELECT field_1, field_2 
INTO table_backup 
   FROM table 
   WHERE somefield='whatever

// 6:
// Selecting data from more than one table is also possible.
// Example:

SELECT table1.field, table2.field 
INTO table1_backup 
   FROM table1 
      INNER JOIN table2 
      ON table1.somefield=table2.somefield

Cheers
 
Hi, I can use my online webserver's mysqladmin. Now I want to copy the whole DB(if possible) / some TABLEs(structure & data) to my HDD so that I can use them in my local(HDD) webserver. Is it possible/have any idea , how can I do that ???
 
Back
Top