For example, say I have a table with 10 columns in it, but I have them all defaulting to null and when I want to insert a row I only want to insert 5 values into it. Do I need to include the columns that are defaulting to null in my query when inserting a new row, or can I exclude them and just specify values for the columns I want to put values in?
Share
You needn’t type each and every column.
You may specify the columns you wish to insert like this:
Reference: http://dev.mysql.com/doc/refman/5.5/en/insert.html
If you were to leave out the column list, then you’d need to enter a value for all columns: