HOME       LIST

MYSQL - テーブルのデータを export する

テーブルのデータを export する


mysqlにログインしてデータベース指定後以下のように実行

select * into outfile "dump file name" 
         fields terminated by '\t' 
         optionally enclosed by '"' 
         lines terminated by '\n' 
from [table name] where 条件~;

export したデータを importする

load data infile '[export したファイル名]' 
         into table [importするテーブル名] 
         fields terminated by '\t' 
         optionally enclosed by '"' 
         lines terminated by '\n';

以前コンテンツ:MySQL - Windows MySQL DB Backup, Restore
次のコンテンツ:MYSQL - テーブルの構造のみコピーする



Copyright(c) 2007-2024 dojeun.com All Rights Reserved.

Valid XHTML 1.0 Transitional