For example, I now have a table, the field has a, B, C, d four, the load data TXT file contains only 3 fields (A, B, c) values, while importing, I can set a value for each record's D field? (such as the user name of the operation, etc.)
Reply to discussion (solution)
LOAD DATA infile Syntax
LOAD DATA [Low_priority | CONCURRENT] [LOCAL] INFILE ' file_name.txt '
[REPLACE | IGNORE]
Into TABLE tbl_name
[Fields
[TERMINATED by ' string ']
[[optionally] enclosed by ' char ']
[Escaped by ' char ']
]
[LINES
[Starting by ' string ']
[TERMINATED by ' string ']
]
[IGNORE number LINES]
[(Col_name_or_user_var,...)]
[SET col_name = expr,...)]
Set broken should be able to meet your requirements.
Note: The character set indicated by the CHARACTER_SET_DATABASE system variable is used to interpret the information in the file. Set names and character_set_client settings do not affect the interpretation of the input.