|
¡¡
|
Chapter 10 -
Importing and exporting of HYSQL
|
10.1 Export
Exporting specifies that converts the records of HYSQL
database file to a formatted .txt textfile.
syntax:TABLE COPY TableName [(FieldName[,FieldName]...)] TO
TextfileName[ FIELDWITH (FieldDelimiter)][ RECORDWITH
(RecordDelimiter)][ WHERE
FiltrationCondition]
Notes:When the above statement is TABLE COPY
TableName TO TextfileName,namely show:
Convert all records of a HYSQL database
file into a textfile which seperates fields with the delimiter
",",and seperates records with the delimiter "\r\n"(return
and newline).
10.2 Import
Importing is the anti-procedure of exporting,namely specifies that
entirely converts a formatted .txt textfile into records and
inserts into the specified HYSQL database file.
syntax: INSERT INTO TableName
[(FieldName[,FieldName]...)] FROM TextfileName[
FIELDWITH (FieldDelimiter)][
WHERE FiltrationCondition]
Notes:When the above statement is INSERT INTO
TableName FROM TextfileName,namely show:
Convert every line in the textfile
into a record and insert into the TableNAME
database file.Here the textfile seperates fields with the delimiter
",",and seperates lines with the delimiter "\r\n"(return
and newline),and its fields order is corresponding to the fields order of
the database file.
Notes: Except the same suffix name, the .dbf file of HYSQL is not
relative to the .dbf file of other databases,one .dbf file can't convert
into another .dbf file.
Return
|
¡¡ |