I'm using MySQL command line and need to insert data into my table. I'm having a major brain fart and feel really rusty on this and cannot remember on how to do this correctly. Here is how my table looks currently:
I deleted items from my database, and this is all that is left in my books table. I want to add another book that has the title "Faith" and the author "Nelson", so I tried the following command, but get an error as you can see below:
I don't want to enter information for the key, I want it to generate automatically without me having to manually enter it. Can someone please show me how to enter this data correctly? Thanks.
Try this:
INSERT INTO books (`title`, `author`)
VALUES
('faith', 'nelson');