I have a table in which the first column is auto_increment. I want to insert data into the table, but skip the first column as it is updated automatically when a new row is begun. so:
INSERT INTO table VALUES (NULL,"lady","gaga","rulz");
But NULL cannot be inserted into a column as I specified earlier. What do I need to replace NULL with so that the column doesn't get anything inserted into it?
Just make sure you specify the respective column names
INSERT INTO table (col1, col2, col3) VALUES ("lady","gaga","rulz");
You don't even need to fill all columns (if they are not required), Ie.
INSERT INTO table (col2) VALUES ("gaga");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With