
Join the Conversation!
Subscribing gives you access to the comments so you can share your ideas, ask questions, and connect with others.
What good is a database without data?
Let's talk about inserting rows into our 'Users' table. In a web application, we would be performing this action whenever we register a new user. "Inserting" means 'Creating A New Entry':
When we INSERT a new row, we only need to provide the values that don't have a default, and we won't need to provide an ID (as the ID is set to 'auto_increment')
INSERT INTO Users (name, email)
VALUES ("Oscar","oscar@email.com");
Here we've "Inserted" a new row into the "Users" table with a name and an email.
Our Database automatically populates all the default fields.
Let's take a look at the statement.
INSERT INTO Users (name, email)
VALUES ("Oscar","oscar@email.com");
The Insert statment has 3 unique parts. We need:
"Please login to view comments"
Subscribing gives you access to the comments so you can share your ideas, ask questions, and connect with others.