Importing and Exporting Data

11 important questions on Importing and Exporting Data

Does LOAD DATA INFILE support multiple tables?

No

Does SELECT INTO OUTFILE support multiple tables?

Yes

What is the format of the LOAD DATA INFILE statement?

LOAD DATA [LOCAL] INFILE 'file_name'
    [IGNORE | REPLACE]
    INTO TABLE table_name
    format_specifiers
    [IGNORE n LINES]
    [(column_list)]
    [SET (assignment_list)]
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

What does the local option do in the LOAD DATA INFILE statement?

Loads the data file from the client side harddisk

What does the SET clause do in a LOAD DATA INFILE statement?

Allows for data transformation before insertion

What is the syntax of the format specifier clause of a SELECT INTO OUTFILE statement?

FIELDS
    TERMINATED BY 'string'
    ENCLOSED BY 'char'
    ESCAPED BY 'char'
LINES TERMINATED BY 'string'

What does OPTIONALLY ENCLOSED BY for a SELECT INTO OUTFILE statement?

Only quotes strings in output

What is the meaning of \N, \O and \b in SELECT INTO OUTFILE output?

NULL en Nul (zero) byte en backspace

What is the syntax of the mysql import command?

mysqlimport options db_name input_file ...

What is the syntax of the mysqldump command?

mysqldump --tab=dir_name options db_name tbl_name ...

What 2 options are mutually exclusive in mysqldump?

--all-databases en --tab

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo