Is there a way in mysql to insert a new row in a way that more directly associates a value with its column (rather than table(col_name) values(value)
)? When inserting a lot of values at one time, listing them in-line gets rather confusing and leads to errors/mistakes.
I'm looking for something more like UPDATE
's syntax of SET col_name='value'
.
I see in the mysql doc for INSERT there is the following:
INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
[INTO] tbl_name
SET col_name={expr | DEFAULT}, ...
[ ON DUPLICATE KEY UPDATE
col_name=expr
[, col_name=expr] ... ]
but that is just for duplicates :/